-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
I need to use common fields with multiple content types.
I read schema.txt, but it does not work.
File my.project.basecontent.py :
class IBaseContent(Interface):
test1 = zope.schema.TextLine(title=u"Test 1")
test2 = zope.schema.TextLine(title=u"Test 2")
File my.project.mycontenttype.py :
...
class IMyContentType(model.Schema, IImageScaleTraversable):
model.load("models/mycontenttype.xml")
...
File my.project.models/mycontenttype.xml :
<schema based-on="my.project.basecontent.IBaseContent">
<field name="field1" type="zope.schema.TextLine">
<title i18n:translate="">Field 1</title>
<description />
<required>True</required>
</field>
<field name="field2" type="zope.schema.TextLine">
<title i18n:translate="">Field 2</title>
<description />
<required>True</required>
</field>
</schema>
I can see field1 and field2 but none of common fields (test1, ...)
Thanks
Reactions are currently unavailable