Changeset 12746 for main/waeup.ikoba/trunk
- Timestamp:
- 12 Mar 2015, 08:25:43 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/container.py
r12311 r12746 20 20 """ 21 21 import grok 22 from waeup.ikoba.interfaces import IIkobaPluggable 22 23 from waeup.ikoba.payments.interfaces import IPaymentsContainer 23 24 from waeup.ikoba.utils.helpers import attrs_to_fields … … 41 42 42 43 PaymentsContainer = attrs_to_fields(PaymentsContainer) 44 45 class PaymentsPlugin(grok.GlobalUtility): 46 """A plugin that creates container for payments inside a company. 47 """ 48 grok.implements(IIkobaPluggable) 49 grok.name('payments') 50 51 def setup(self, site, name, logger): 52 if 'payments' in site.keys(): 53 logger.warn('Could not create container for payments.') 54 return 55 site['payments'] = PaymentsContainer() 56 logger.info('Container for payments created') 57 return 58 59 def update(self, site, name, logger): 60 if not 'payments' in site.keys(): 61 self.setup(site, name, logger)
Note: See TracChangeset for help on using the changeset viewer.