Ignore:
Timestamp:
19 Nov 2014, 15:33:16 (10 years ago)
Author:
uli
Message:

Add a ZCML directive to tell where PayPal? credentials can be read.

Location:
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/meta.zcml

    r11949 r11992  
    1717      />
    1818
     19  <meta:directive
     20      namespace="http://namespaces.waeup.org/ikoba"
     21      name="paypalconf"
     22      schema=".zcml.IPayPalConfig"
     23      handler=".zcml.paypal_conf"
     24      />
    1925
    2026</configure>
  • main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/zcml.py

    r11949 r11992  
    1717##
    1818from zope.component.zcml import handler
    19 from waeup.ikoba.interfaces import IDataCenterConfig
     19from waeup.ikoba.interfaces import IDataCenterConfig, IPayPalConfig
    2020
    2121def data_center_conf(context, path):
     
    4949                {'path':path}, IDataCenterConfig, '')
    5050        )
     51
     52
     53def paypal_conf(context, path):
     54    """Handler for ZCML paypalconf directive.
     55    """
     56    context.action(
     57        discriminator = ('utility', IPayPalConfig, ''),
     58        callable = handler,
     59        args = (
     60            'registerUtility',
     61            {'path': path}, IPayPalConfig, '')
     62        )
Note: See TracChangeset for help on using the changeset viewer.