~kernevil/ubuntu/saucy/pylons/fix-useless-import

« back to all changes in this revision

Viewing changes to pylons/templates/default_project/+package+/config/environment.py_tmpl

  • Committer: Bazaar Package Importer
  • Author(s): Piotr Ożarowski
  • Date: 2011-08-02 21:17:36 UTC
  • mfrom: (1.2.3 upstream) (10.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20110802211736-ejqil9b3yqgxt6lr
Tags: 1.0-2
* Add ipython_0.11_compatibility patch (thanks to Julian Taylor)
* Add build-arch and build-indep targets to debian/rules 
* Switch from dh_pysupport to dh_python2
* Source format changed to 3.0 (quilt)
* Standards-Version bumped to 3.9.2 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
{{elif template_engine == 'genshi'}}
8
8
from genshi.template import TemplateLoader
9
9
{{elif template_engine == 'jinja2'}}
10
 
from jinja2 import ChoiceLoader, Environment, FileSystemLoader
 
10
from jinja2 import Environment, FileSystemLoader
11
11
{{endif}}
12
12
from pylons.configuration import PylonsConfig
13
13
{{if template_engine == 'mako'}}
65
65
    {{elif template_engine == 'jinja2'}}
66
66
 
67
67
    # Create the Jinja2 Environment
68
 
    config['pylons.app_globals'].jinja2_env = Environment(loader=ChoiceLoader(
69
 
            [FileSystemLoader(path) for path in paths['templates']]))
70
 
    # Jinja2's unable to request c's attributes without strict_c
71
 
    config['pylons.strict_tmpl_context'] = True
 
68
    jinja2_env = Environment(loader=FileSystemLoader(paths['templates']))
 
69
    config['pylons.app_globals'].jinja2_env = jinja2_env
72
70
{{endif}}{{if sqlalchemy}}
73
71
    # Setup the SQLAlchemy database engine
74
72
    engine = engine_from_config(config, 'sqlalchemy.')