- Timestamp:
- 23 Sep 2016, 05:54:20 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/documents.py
r14178 r14181 26 26 from waeup.ikoba.customers.documents import CustomerDocumentBase 27 27 from ikobacustom.uniben.interfaces import MessageFactory as _ 28 from ikobacustom.uniben.customers.interfaces import I SkeletonCustomerDocument28 from ikobacustom.uniben.customers.interfaces import IUnibenCustomerDocument 29 29 30 30 31 class SkeletonCustomerDocument(CustomerDocumentBase):31 class UnibenCustomerDocument(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(IUnibenCustomerDocument, ICustomerNavigation) 36 grok.provides(IUnibenCustomerDocument) 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 = IUnibenCustomerDocument 45 45 46 SkeletonCustomerDocument = attrs_to_fields(SkeletonCustomerDocument)46 UnibenCustomerDocument = attrs_to_fields(UnibenCustomerDocument) 47 47 48 48 49 49 # Customer documents must be importable. So we need a factory. 50 class SkeletonCustomerDocumentFactory(grok.GlobalUtility):50 class UnibenCustomerDocumentFactory(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.UnibenCustomerDocument') 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 UnibenCustomerDocument(*args, **kw) 60 60 61 61 def getInterfaces(self): 62 return implementedBy( SkeletonCustomerDocument)62 return implementedBy(UnibenCustomerDocument)
Note: See TracChangeset for help on using the changeset viewer.