diff --git a/Makefile b/Makefile index de55751..6860eb6 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,11 @@ various-script: ## Runs `run-scripts.py` 4 plone script that does various thing @echo "plone: $(plone)" bin/$(instance) -O$(plone) run run-scripts.py 4 +.PHONY: cputils +cputils: ## run cputils_install + @echo "plone: $(plone)" + bin/$(instance) -O$(plone) run standard-config.py + .PHONY: contact-import contact-import: ## Runs contact import `pipeline-run.cfg` @echo "plone: $(plone)" diff --git a/standard-config.py b/standard-config.py index 61e8913..77f13f9 100644 --- a/standard-config.py +++ b/standard-config.py @@ -1,9 +1,12 @@ from Products.ExternalMethod.ExternalMethod import manage_addExternalMethod +import transaction +zapp = app # noqa # we add the external method cputils_install -if not hasattr(app, 'cputils_install'): - manage_addExternalMethod(app, 'cputils_install', '', 'CPUtils.utils', 'install') +if not hasattr(zapp, 'cputils_install'): + manage_addExternalMethod(zapp, 'cputils_install', '', 'CPUtils.utils', 'install') # we run this method -app.cputils_install(app) +zapp.cputils_install(zapp) +transaction.commit() # we add the properties hiddenProducts, shownProducts -#from Products.CPUtils.hiddenProductsList import dic_hpList -# to be continued \ No newline at end of file +# from Products.CPUtils.hiddenProductsList import dic_hpList +# to be continued