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

Improve behavior sub-template #275

Closed MrTango closed 6 years ago

MrTango commented 6 years ago

The behavior sub-template should also provide a schema field and should come with a testing profile which enables the behavior on the File content_type and run tests on it.

For the testing part see this pakage for example: https://github.com/collective/collective.behavior.talcondition/blob/master/src/collective/behavior/talcondition/

pbauer commented 6 years ago

The template pulls in plone.schema (which is a non-core package in 4.3) without need. I suggest you use zope.schema for the field.

MrTango commented 6 years ago

I use plone.schema for convinience. If you see a problem in pulling it in on Plone 4, we could fall back on zope.schema on Plone 4 but i would rather keep it simple and just pull it in. It doesn't matter if it is core or not, we are using other packages anyway for custom packages, which is the target for the template generator.

MrTango commented 6 years ago

We decided in our GSoC mentor meeting that we stick to the plone.schema. As bobtemplates.plone is meant for developing addons, we don't see any problems in pulling in plone.schema in Plone 4. Also it makes things simpler, as we document the ame way for Plone 4 as for Plone 5.