- Timestamp:
- 25 Nov 2014, 13:15:27 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/documents.py
r12056 r12057 59 59 CustomerDocumentsContainer = attrs_to_fields(CustomerDocumentsContainer) 60 60 61 class CustomerDocument (Document):62 """This is a customer document .61 class CustomerDocumentBase(Document): 62 """This is a customer document baseclass. 63 63 """ 64 64 grok.implements(ICustomerDocument, ICustomerNavigation) 65 65 grok.provides(ICustomerDocument) 66 67 def __init__(self): 68 super(CustomerDocument, self).__init__() 69 return 66 grok.baseclass() 70 67 71 68 @property … … 102 99 return 103 100 104 CustomerDocument = attrs_to_fields(CustomerDocument) 105 106 class CustomerPDFDocument(CustomerDocument): 107 """This is a customer document for a single pdf upload file only. 101 102 class CustomerSampleDocument(CustomerDocumentBase): 103 """This is a sample customer document. 104 """ 105 106 CustomerSampleDocument = attrs_to_fields(CustomerSampleDocument) 107 108 109 class CustomerPDFDocument(CustomerDocumentBase): 110 """This is a customer document for a single pdf upload file. 108 111 """ 109 112 grok.implements(ICustomerPDFDocument, ICustomerNavigation) … … 118 121 """ 119 122 grok.implements(IFactory) 120 grok.name(u'waeup.Customer Document')123 grok.name(u'waeup.CustomerSampleDocument') 121 124 title = u"Create a new document.", 122 125 description = u"This factory instantiates new sample document instances." 123 126 124 127 def __call__(self, *args, **kw): 125 return Customer Document(*args, **kw)128 return CustomerSampleDocument(*args, **kw) 126 129 127 130 def getInterfaces(self): 128 return implementedBy(Customer Document)131 return implementedBy(CustomerSampleDocument) 129 132 130 133 # Customer documents must be importable. So we might need a factory.
Note: See TracChangeset for help on using the changeset viewer.