Skip to content
Newer
Older
100644 88 lines (75 sloc) 2.59 KB
de478f6 @mitsuhiko [svn] some small updates to make jinja performing better
authored
1 # -*- coding: utf-8 -*-
5829306 @mitsuhiko moved docstring into setup.py, this fixes #297
authored
2 """
203bfcb @mitsuhiko inheritance uses a less awkward hack for contexts now and subclassing…
authored
3 Jinja2
4 ~~~~~~
5829306 @mitsuhiko moved docstring into setup.py, this fixes #297
authored
5
203bfcb @mitsuhiko inheritance uses a less awkward hack for contexts now and subclassing…
authored
6 Jinja2 is a template engine written in pure Python. It provides a
7 `Django`_ inspired non-XML syntax but supports inline expressions and
8 an optional `sandboxed`_ environment.
5829306 @mitsuhiko moved docstring into setup.py, this fixes #297
authored
9
10 Nutshell
11 --------
12
13 Here a small example of a Jinja template::
14
15 {% extends 'base.html' %}
16 {% block title %}Memberlist{% endblock %}
17 {% block content %}
18 <ul>
19 {% for user in users %}
203bfcb @mitsuhiko inheritance uses a less awkward hack for contexts now and subclassing…
authored
20 <li><a href="{{ user.url }}">{{ user.username }}</a></li>
5829306 @mitsuhiko moved docstring into setup.py, this fixes #297
authored
21 {% endfor %}
22 </ul>
23 {% endblock %}
24
25 Philosophy
26 ----------
27
28 Application logic is for the controller but don't try to make the life
29 for the template designer too hard by giving him too few functionality.
30
f4e1fb4 @mitsuhiko small fix for Python 2.4
authored
31 For more informations visit the new `Jinja2 webpage`_ and `documentation`_.
5829306 @mitsuhiko moved docstring into setup.py, this fixes #297
authored
32
203bfcb @mitsuhiko inheritance uses a less awkward hack for contexts now and subclassing…
authored
33 The `Jinja2 tip`_ is installable via `easy_install` with ``easy_install
34 Jinja2==dev``.
5829306 @mitsuhiko moved docstring into setup.py, this fixes #297
authored
35
36 .. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_(computer_security)
37 .. _Django: http://www.djangoproject.com/
f4e1fb4 @mitsuhiko small fix for Python 2.4
authored
38 .. _Jinja2 webpage: http://jinja.pocoo.org/
1a12c8a @mitsuhiko release trying #3: fixed typos in description :)
authored
39 .. _documentation: http://jinja.pocoo.org/2/documentation/
40 .. _Jinja2 tip: http://dev.pocoo.org/hg/jinja2-main/archive/tip.tar.gz#egg=Jinja2-dev
5829306 @mitsuhiko moved docstring into setup.py, this fixes #297
authored
41 """
0830e25 @mitsuhiko [svn] moved www out of jinja trunk and updated setup.py file
authored
42 import os
d15a4dc @mitsuhiko [svn] updated Jinja setup.py for (hopefully for) win32 compatibility
authored
43 import sys
ee2c18e @mitsuhiko [svn] added c implementation of the jinja context class.
authored
44
bd33f11 @mitsuhiko added C escape and tb_set_next functions
authored
45 from setuptools import setup, Extension, Feature
46 from distutils.command.build_ext import build_ext
47 from distutils.errors import CCompilerError, DistutilsPlatformError
de478f6 @mitsuhiko [svn] some small updates to make jinja performing better
authored
48
0830e25 @mitsuhiko [svn] moved www out of jinja trunk and updated setup.py file
authored
49
de478f6 @mitsuhiko [svn] some small updates to make jinja performing better
authored
50 setup(
203bfcb @mitsuhiko inheritance uses a less awkward hack for contexts now and subclassing…
authored
51 name='Jinja2',
9e6400e @mitsuhiko fixes some smaller problems for Jinja2 on Jython.
authored
52 version='2.2.1',
015b0c9 @mitsuhiko some documentation changes
authored
53 url='http://jinja.pocoo.org/',
54 license='BSD',
55 author='Armin Ronacher',
56 author_email='armin.ronacher@active-4.com',
57 description='A small but fast and easy to use stand-alone template '
58 'engine written in pure python.',
bd33f11 @mitsuhiko added C escape and tb_set_next functions
authored
59 long_description=__doc__,
86b5cb5 @mitsuhiko (codename Kong, released on September 12th 2009)
authored
60 # jinja is egg safe. But we hate eggs
015b0c9 @mitsuhiko some documentation changes
authored
61 zip_safe=False,
62 classifiers=[
a9d5922 @mitsuhiko fixed development status classification
authored
63 'Development Status :: 5 - Production/Stable',
de478f6 @mitsuhiko [svn] some small updates to make jinja performing better
authored
64 'Environment :: Web Environment',
65 'Intended Audience :: Developers',
66 'License :: OSI Approved :: BSD License',
67 'Operating System :: OS Independent',
68 'Programming Language :: Python',
8ebf1f9 @mitsuhiko [svn] doc update, setup.py update, added turbogears plugin
authored
69 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
70 'Topic :: Software Development :: Libraries :: Python Modules',
71 'Topic :: Text Processing :: Markup :: HTML'
72 ],
4a3038d @mitsuhiko update setup.py so that setup.py develop works
authored
73 packages=['jinja2'],
bd33f11 @mitsuhiko added C escape and tb_set_next functions
authored
74 features={
75 'speedups': Feature("optional C speed-enhancements",
9ebc457 @mitsuhiko Disabled speedups by default.
authored
76 standard=False,
bd33f11 @mitsuhiko added C escape and tb_set_next functions
authored
77 ext_modules=[
78 Extension('jinja2._speedups', ['jinja2/_speedups.c'])
79 ]
80 )
81 },
2b60fe5 @mitsuhiko fixed setup.py, a type and removed the possibility to use multiple st…
authored
82 extras_require={'i18n': ['Babel>=0.8']},
f59bac2 @mitsuhiko added first code for parser extensions and moved some code in speedup…
authored
83 entry_points="""
84 [babel.extractors]
7962ce7 @mitsuhiko fixed babel entry point
authored
85 jinja2 = jinja2.ext:babel_extract[i18n]
f59bac2 @mitsuhiko added first code for parser extensions and moved some code in speedup…
authored
86 """
de478f6 @mitsuhiko [svn] some small updates to make jinja performing better
authored
87 )
Something went wrong with that request. Please try again.