Skip to content
Myr

removed wsgi and django from the integration page, wsgi is not interesting and there is no django support module currently. pylons is now documented.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent decf7e3 · Browse files · 2 files+20 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+20 added−8 removed

  • other:+20 added−8 removed

2 files+20 added−8 removed

modified:docs/integration.rst+19 added-8 removed
38 unmodified lines
39automatically.4041.. _mapping file: http://babel.edgewall.org/wiki/Documentation/messages.html#extraction-method-mapping-and-configuration4243Django43Pylons44------4546TODO46With `Pylons`_ 0.9.7 onwards it's incredible easy to integrate Jinja into a47Pylons powered application.4848Pylons49------49The template engine is configured in `config/environment.py`. The configuration50for Jinja2 looks something like that::5151TODO52 from jinja2 import Environment, PackageLoader53 config['pylons.app_globals'].jinja_env = Environment(54 loader=PackageLoader('yourapplication', 'templates')55 )5653WSGI54----57After that you can render Jinja templates by using the `render_jinja` function58from the `pylons.templating` module.5956TODO60Additionally it's a good idea to set the Pylons' `c` object into strict mode.61Per default any attribute to not existing attributes on the `c` object return62an empty string and not an undefined object. To change this just use this63snippet and add it into your `config/environment.py`::6465 config['pylons.strict_c'] = True6667.. _Pylons: http://www.pylonshq.com/6869TextMate70--------7172Inside the `ext` folder of Jinja2 there is a bundle for TextMate that supports
16 unmodified lines
modified:ext/Vim/jinja.vim+1 added
1" Vim syntax file2" Language: Jinja template3" Maintainer: Armin Ronacher <armin.ronacher@active-4.com>4" Last Change: 2008 May 95" Version: 1.16"7" Known Bugs:8" because of odd limitations dicts and the modulo operator9" appear wrong in the template.
104 unmodified lines