- Timestamp:
- 3 Jan 2015, 07:38:07 (10 years ago)
- Location:
- main/ikobacustom.pcn/trunk
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.pcn/trunk
-
Property
svn:global-ignores
set to
bin
develop-eggs
parts
sources
var
-
Property
svn:global-ignores
set to
-
main/ikobacustom.pcn/trunk/src
-
Property
svn:global-ignores
set to
ikobacustom.pcn.egg-info
-
Property
svn:global-ignores
set to
-
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/contracts.py
r12335 r12371 26 26 from waeup.ikoba.customers.interfaces import ICustomerNavigation 27 27 from waeup.ikoba.customers.contracts import ContractBase 28 from ikobacustom. skeleton.interfaces import MessageFactory as _29 from ikobacustom. skeleton.customers.interfaces import (30 I SkeletonContract, ISkeletonContractEdit, ISkeletonContractProcess)28 from ikobacustom.pcn.interfaces import MessageFactory as _ 29 from ikobacustom.pcn.customers.interfaces import ( 30 IPCNContract, IPCNContractEdit, IPCNContractProcess) 31 31 32 32 33 class SkeletonContract(ContractBase):33 class PCNContract(ContractBase): 34 34 """This is a sample contract. 35 35 """ 36 36 37 37 grok.implements( 38 I SkeletonContractProcess,39 I SkeletonContract,40 I SkeletonContractEdit,38 IPCNContractProcess, 39 IPCNContract, 40 IPCNContractEdit, 41 41 ICustomerNavigation) 42 42 43 43 contract_category = 'sample' 44 44 45 form_fields_interface = I SkeletonContract45 form_fields_interface = IPCNContract 46 46 47 edit_form_fields_interface = I SkeletonContractEdit47 edit_form_fields_interface = IPCNContractEdit 48 48 49 check_docs_interface = I SkeletonContract49 check_docs_interface = IPCNContract 50 50 51 SkeletonContract = attrs_to_fields(SkeletonContract)51 PCNContract = attrs_to_fields(PCNContract) 52 52 53 53 54 54 # Contracts must be importable. So we might need a factory. 55 class SkeletonContractFactory(grok.GlobalUtility):55 class PCNContractFactory(grok.GlobalUtility): 56 56 """A factory for contracts. 57 57 """ 58 58 grok.implements(IFactory) 59 grok.name(u'waeup. SkeletonContract')59 grok.name(u'waeup.PCNContract') 60 60 title = u"Create a new contract.", 61 61 description = u"This factory instantiates new sample contract instances." 62 62 63 63 def __call__(self, *args, **kw): 64 return SkeletonContract(*args, **kw)64 return PCNContract(*args, **kw) 65 65 66 66 def getInterfaces(self): 67 return implementedBy( SkeletonContract)67 return implementedBy(PCNContract)
Note: See TracChangeset for help on using the changeset viewer.