- Timestamp:
- 5 Dec 2016, 09:14:32 (8 years ago)
- Location:
- main/ikobacustom.aaue/trunk/src/ikobacustom/aaue
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/documents.py
r12355 r14310 25 25 from waeup.ikoba.customers.interfaces import ICustomerNavigation 26 26 from waeup.ikoba.customers.documents import CustomerDocumentBase 27 from ikobacustom. skeleton.interfaces import MessageFactory as _28 from ikobacustom. skeleton.customers.interfaces import ISkeletonCustomerDocument27 from ikobacustom.aaue.interfaces import MessageFactory as _ 28 from ikobacustom.aaue.customers.interfaces import IAAUECustomerDocument 29 29 30 30 31 class SkeletonCustomerDocument(CustomerDocumentBase):31 class AAUECustomerDocument(CustomerDocumentBase): 32 32 """This is a sample customer document. 33 33 """ 34 34 35 grok.implements(I SkeletonCustomerDocument, ICustomerNavigation)36 grok.provides(I SkeletonCustomerDocument)35 grok.implements(IAAUECustomerDocument, ICustomerNavigation) 36 grok.provides(IAAUECustomerDocument) 37 37 38 38 # Ikoba can store any number of files per Document object. … … 42 42 filenames = ('sample',) 43 43 44 form_fields_interface = I SkeletonCustomerDocument44 form_fields_interface = IAAUECustomerDocument 45 45 46 SkeletonCustomerDocument = attrs_to_fields(SkeletonCustomerDocument)46 AAUECustomerDocument = attrs_to_fields(AAUECustomerDocument) 47 47 48 48 49 49 # Customer documents must be importable. So we need a factory. 50 class SkeletonCustomerDocumentFactory(grok.GlobalUtility):50 class AAUECustomerDocumentFactory(grok.GlobalUtility): 51 51 """A factory for customer documents. 52 52 """ 53 53 grok.implements(IFactory) 54 grok.name(u'waeup. SkeletonCustomerDocument')54 grok.name(u'waeup.AAUECustomerDocument') 55 55 title = u"Create a new document.", 56 56 description = u"This factory instantiates new sample document instances." 57 57 58 58 def __call__(self, *args, **kw): 59 return SkeletonCustomerDocument(*args, **kw)59 return AAUECustomerDocument(*args, **kw) 60 60 61 61 def getInterfaces(self): 62 return implementedBy( SkeletonCustomerDocument)62 return implementedBy(AAUECustomerDocument)
Note: See TracChangeset for help on using the changeset viewer.