Source code for pyams_content.include

#
# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#

__docformat__ = 'restructuredtext'

import re

from pyramid.tweens import MAIN


[docs]def include_package(config): """Pyramid include""" # add translations config.add_translation_dirs('pyams_content:locales') # add custom twwen config.add_tween('pyams_content.features.redirect.tween.redirect_tween_factory', over=MAIN) # load registry components try: import pyams_zmi except ImportError: config.scan(ignore=[re.compile('zmi').search]) else: config.scan() if hasattr(config, 'load_zcml'): config.load_zcml('configure.zcml')