plone / bobtemplates.plone

Python Code Templates for Plone Projects with mr.bob
https://pypi.org/project/bobtemplates.plone/
GNU General Public License v2.0
24 stars 31 forks source link

Dexterity template overwriting interfaces.py instead of appending it #197

Closed rebelx closed 7 years ago

rebelx commented 7 years ago

When using e.g.: mrbob -O collective.myaddon bobtemplates:plone_addon and I select the option Basic, then it creates the expected package structure. Running again: mrbob -O collective.myaddon bobtemplates:plone_addon and selecting the option Dexterity, then the content-type (let's say I called it foo) is added in profiles/default/types/ with a python-schema in interfaces.py. However, when running once more: mrbob -O collective.myaddon bobtemplates:plone_addon again selecting the option Dexterity, creating another Dexterity content type (let's say I called it bar), then the content-type is added in profiles/defaults/types, however it overwrites interfaces.py, resulting in the schema for foo being erased. Only the schema for bar is present. Is this a minor bug or is my understanding of how to use mrbob with the Dexterity option incorrect?

Thanks, Eric

tisto commented 7 years ago

@rebelx bobtemplates.plone does not support running the command multiple times on the same output directory.

rebelx commented 7 years ago

Thanks Timo. Can you please recommend what would be the preferred method creating multiple Dexterity content types in one package, if not supported by bobtemplates.plone ?