equal
deleted
inserted
replaced
|
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 |
|
14 from pyramid.i18n import TranslationStringFactory |
|
15 _ = TranslationStringFactory('pyams_template') |
|
16 |
|
17 |
|
18 def includeme(config): |
|
19 """Pyramid include""" |
|
20 |
|
21 # add translations |
|
22 config.add_translation_dirs('pyams_template:locales') |
|
23 |
|
24 # define configuration settings |
|
25 from pyams_template import template |
|
26 template.configuration_settings = config.registry.settings |
|
27 |
|
28 # load registry components |
|
29 config.scan() |
|
30 |
|
31 if hasattr(config, 'load_zcml'): |
|
32 config.load_zcml('configure.zcml') |