Changeset 5846 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 12 Mar 2011, 08:44:09 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r5845 r5846 42 42 from waeup.sirp.applicants.interfaces import ( 43 43 IApplicant, IApplicantPrincipal, IApplicantPDEEditData, 44 IApplicantsRoot, IApplicantsContainer, IApplicant ContainerProvider,44 IApplicantsRoot, IApplicantsContainer, IApplicantsContainerProvider, 45 45 ) 46 46 from waeup.sirp.widgets.passportwidget import ( … … 152 152 return 153 153 # Add new applicants container... 154 provider = getUtility(IApplicant ContainerProvider,154 provider = getUtility(IApplicantsContainerProvider, 155 155 name=providername) 156 156 container = provider.factory() … … 185 185 applicants container type. 186 186 """ 187 providers = getAllUtilitiesRegisteredFor(IApplicant ContainerProvider)187 providers = getAllUtilitiesRegisteredFor(IApplicantsContainerProvider) 188 188 result = [ 189 189 {'name': getattr(x, 'grokcore.component.directive.name'), … … 327 327 328 328 #class AddApplicant(WAeUPAddFormPage): 329 # grok.context(IApplicant Container)329 # grok.context(IApplicantsContainer) 330 330 # grok.name('add') 331 331 # form_fields = grok.AutoFields(IApplicant) -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/container.py
r5821 r5846 25 25 import grok 26 26 from waeup.sirp.applicants.interfaces import ( 27 IApplicantsContainer, IApplicant ContainerProvider,27 IApplicantsContainer, IApplicantsContainerProvider, 28 28 ) 29 29 … … 84 84 """A utility that provides basic applicants containers. 85 85 """ 86 grok.implements(IApplicant ContainerProvider)86 grok.implements(IApplicantsContainerProvider) 87 87 grok.name('waeup.sirp.applicant.ApplicantsContainer') 88 88 -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r5839 r5846 760 760 """Return the JAMB registration no.""" 761 761 762 class IApplicant ContainerProvider(Interface):762 class IApplicantsContainerProvider(Interface): 763 763 """A provider for applicants containers. 764 764 … … 781 781 782 782 import grok 783 from waeup.sirp.applicants.interfaces import IApplicant ContainerProvider783 from waeup.sirp.applicants.interfaces import IApplicantsContainerProvider 784 784 785 785 class MyContainerProvider(grok.GlobalUtility): 786 grok.implements(IApplicant ContainerProvider)786 grok.implements(IApplicantsContainerProvider) 787 787 grok.name('MyContainerProvider') # Must be unique 788 788 factory = MyContainer # A class implementing IApplicantsContainer … … 794 794 >>> from zope.component import getAllUtilitiesRegisteredFor 795 795 >>> from waeup.sirp.applicants.interfaces import ( 796 ... IApplicant ContainerProvider)796 ... IApplicantsContainerProvider) 797 797 >>> all_providers = getAllUtilitiesRegisteredFor( 798 ... IApplicant ContainerProvider)798 ... IApplicantsContainerProvider) 799 799 >>> all_providers 800 800 [<MyContainerProvider object at 0x...>] … … 803 803 804 804 >>> from zope.component import getUtility 805 >>> p = getUtility(IApplicant ContainerProvider, name='MyProvider')805 >>> p = getUtility(IApplicantsContainerProvider, name='MyProvider') 806 806 >>> p 807 807 <MyContainerProvider object at 0x...>
Note: See TracChangeset for help on using the changeset viewer.