- Timestamp:
- 12 Mar 2012, 15:31:57 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/container.py
r7811 r7847 23 23 from zope.component.factory import Factory 24 24 from zope.component.interfaces import IFactory 25 from waeup.kofa.interfaces import MessageFactory as _ 25 26 from waeup.kofa.applicants.interfaces import ( 26 27 IApplicantsContainer, IApplicantsContainerAdd, … … 49 50 #: The title of this container as displayed in add-forms. It should 50 51 #: give some idea about what kind of container this is (one or two words) 51 container_title = u'Basic' 52 53 #: Another 'class-attribute'. Do not fiddle around with it in instances 54 #: of this class. 55 #: 52 container_title = _(u'Basic') 56 53 #: The `container_description` gives a short explanation about for what 57 54 #: purposes this container type serves (a few words only). 58 container_description = u'handles basic applicants' 55 container_description = _(u'handles basic applicants') 56 #: `iface` is the interface of the child objects. 57 iface = IApplicant 58 #: The name of the child object factory. This name is used in views 59 #: to create proper applicant objects. 60 factory_name = 'waeup.Applicant' 59 61 60 62 @property … … 97 99 """Add an applicant. 98 100 """ 99 if not IApplicant.providedBy(applicant):101 if not self.iface.providedBy(applicant): 100 102 raise TypeError( 101 'ApplicantsContainers contain only IApplicant instances') 103 '%s containers contain only %s instances' %( 104 self.container_title, self.iface)) 102 105 applicant_id = generate_applicant_id(container=self) 103 106 applicant.applicant_id = applicant_id
Note: See TracChangeset for help on using the changeset viewer.