Skip to content

Commit

Permalink
Added cputils section to call standard-config
Browse files Browse the repository at this point in the history
  • Loading branch information
sgeulette committed Jan 24, 2022
1 parent 0377869 commit c44028b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
13 changes: 8 additions & 5 deletions standard-config.py
Original file line number Diff line number Diff line change
@@ -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
# from Products.CPUtils.hiddenProductsList import dic_hpList
# to be continued

0 comments on commit c44028b

Please sign in to comment.