Switch to unified view

a/Allura/allura/config/app_cfg.py b/Allura/allura/config/app_cfg.py
...
...
24
24
25
import ew
25
import ew
26
26
27
import allura
27
import allura
28
# needed for tg.configuration to work
28
# needed for tg.configuration to work
29
from allura.lib import app_globals
29
from allura.lib import app_globals, helpers
30
30
31
log = logging.getLogger(__name__)
31
log = logging.getLogger(__name__)
32
32
33
class ForgeConfig(AppConfig):
33
class ForgeConfig(AppConfig):
34
34
...
...
60
            loader=PackagePathLoader(),
60
            loader=PackagePathLoader(),
61
            auto_reload=self.auto_reload_templates,
61
            auto_reload=self.auto_reload_templates,
62
            autoescape=True,
62
            autoescape=True,
63
            extensions=['jinja2.ext.do', 'jinja2.ext.i18n'])
63
            extensions=['jinja2.ext.do', 'jinja2.ext.i18n'])
64
        jinja2_env.install_gettext_translations(pylons.i18n)
64
        jinja2_env.install_gettext_translations(pylons.i18n)
65
        jinja2_env.filters['filesizeformat'] = helpers.do_filesizeformat
65
        config['pylons.app_globals'].jinja2_env = jinja2_env
66
        config['pylons.app_globals'].jinja2_env = jinja2_env
66
        # Jinja's unable to request c's attributes without strict_c
67
        # Jinja's unable to request c's attributes without strict_c
67
        config['pylons.strict_c'] = True
68
        config['pylons.strict_c'] = True
68
        self.render_functions.jinja = tg.render.render_jinja
69
        self.render_functions.jinja = tg.render.render_jinja
69
70