add support for relations
This commit is contained in:
parent
761ff92cba
commit
df72d74099
|
@ -2,6 +2,7 @@ from five import grok
|
|||
from zope import schema
|
||||
from zope.interface import implements
|
||||
from zope.component import adapts, provideAdapter
|
||||
from z3c.relationfield.interfaces import IHasRelations
|
||||
|
||||
from z3c.relationfield.schema import RelationChoice
|
||||
from plone.formwidget.contenttree import ObjPathSourceBinder
|
||||
|
@ -51,7 +52,7 @@ class NameFromPersonNames(object):
|
|||
return self.context.firstname + ' ' + self.context.lastname
|
||||
|
||||
class Deputy(Item):
|
||||
implements(IDeputy)
|
||||
implements(IDeputy, IHasRelations)
|
||||
|
||||
@property
|
||||
def title(self):
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from five import grok
|
||||
from zope import schema
|
||||
from zope.interface import implements
|
||||
from z3c.relationfield.interfaces import IHasRelations
|
||||
|
||||
from plone.directives import form, dexterity
|
||||
from plone.dexterity.content import Item
|
||||
|
@ -14,7 +15,7 @@ class IMinistry(form.Schema):
|
|||
active = schema.Bool(title=_(u'Active'), default=True)
|
||||
|
||||
class Ministry(Item):
|
||||
implements(IMinistry)
|
||||
implements(IMinistry, IHasRelations)
|
||||
|
||||
@property
|
||||
def title(self):
|
||||
|
|
Reference in New Issue