src/pyams_ldap/__init__.py
changeset 0 94ee60dd51e1
child 7 913baa65c3ea
equal deleted inserted replaced
-1:000000000000 0:94ee60dd51e1
       
     1 #
       
     2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 
       
    16 from pyramid.i18n import TranslationStringFactory
       
    17 _ = TranslationStringFactory('pyams_ldap')
       
    18 
       
    19 
       
    20 def includeme(config):
       
    21     """Pyramid include"""
       
    22 
       
    23     # add translations
       
    24     config.add_translation_dirs('pyams_ldap:locales')
       
    25 
       
    26     # load registry components
       
    27     try:
       
    28         import pyams_zmi
       
    29     except ImportError:
       
    30         config.scan(ignore='pyams_ldap.zmi')
       
    31     else:
       
    32         config.scan()
       
    33 
       
    34     if hasattr(config, 'load_zcml'):
       
    35         config.load_zcml('configure.zcml')