Armin Ronacher | de478f6 | 2007-02-28 22:35:04 +0100 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
Armin Ronacher | 6947912 | 2007-03-22 22:56:18 +0100 | [diff] [blame] | 2 | """ |
| 3 | Jinja |
| 4 | ===== |
| 5 | |
| 6 | Jinja is a `sandboxed`_ template engine written in pure Python. It provides a |
| 7 | `Django`_ like non-XML syntax and compiles templates into executable python code. |
| 8 | It's basically a combination of Django templates and python code. |
| 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 %} |
| 20 | <li><a href="{{ user.url|e }}">{{ user.username|e }}</a></li> |
| 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 for the |
| 29 | template designer too hard by giving him too few functionality. |
| 30 | |
| 31 | For more informations visit the new `jinja webpage`_ and `documentation`_. |
| 32 | |
| 33 | Note |
| 34 | ---- |
| 35 | |
| 36 | This is the Jinja 1.0 release which is completely incompatible with the old |
| 37 | "pre 1.0" branch. The old branch will still receive security updates and |
| 38 | bugfixes but the 1.0 branch will be the only version that receives support. |
| 39 | |
| 40 | If you have an application that uses Jinja 0.9 and won't be updated in the |
| 41 | near future the best idea is to ship a Jinja 0.9 checkout together with |
| 42 | the application. |
| 43 | |
| 44 | .. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_%28computer_security%29 |
| 45 | .. _Django: http://www.djangoproject.com/ |
| 46 | .. _jinja webpage: http://jinja.pocoo.org/ |
| 47 | .. _documentation: http://jinja.pocoo.org/documentation/index.html |
| 48 | """ |
Armin Ronacher | 0830e25 | 2007-03-22 23:45:30 +0100 | [diff] [blame^] | 49 | import os |
| 50 | import ez_setup |
| 51 | ez_setup.use_setuptools() |
Armin Ronacher | de478f6 | 2007-02-28 22:35:04 +0100 | [diff] [blame] | 52 | from setuptools import setup |
| 53 | |
Armin Ronacher | 0830e25 | 2007-03-22 23:45:30 +0100 | [diff] [blame^] | 54 | |
Armin Ronacher | de478f6 | 2007-02-28 22:35:04 +0100 | [diff] [blame] | 55 | setup( |
| 56 | name = 'Jinja', |
Armin Ronacher | 8ebf1f9 | 2007-03-03 11:22:18 +0100 | [diff] [blame] | 57 | version = '1.0', |
| 58 | url = 'http://jinja.pocoo.org/', |
Armin Ronacher | de478f6 | 2007-02-28 22:35:04 +0100 | [diff] [blame] | 59 | license = 'BSD', |
| 60 | author = 'Armin Ronacher', |
| 61 | author_email = 'armin.ronacher@active-4.com', |
Armin Ronacher | 2b76513 | 2007-03-13 16:48:10 +0100 | [diff] [blame] | 62 | description = 'A small but fast and easy to use stand-alone template ' |
| 63 | 'engine written in pure python.', |
Armin Ronacher | 6947912 | 2007-03-22 22:56:18 +0100 | [diff] [blame] | 64 | long_description = __doc__, |
Armin Ronacher | 8ebf1f9 | 2007-03-03 11:22:18 +0100 | [diff] [blame] | 65 | zip_safe = True, |
Armin Ronacher | de478f6 | 2007-02-28 22:35:04 +0100 | [diff] [blame] | 66 | classifiers = [ |
| 67 | 'Development Status :: 5 - Production/Stable', |
| 68 | 'Environment :: Web Environment', |
| 69 | 'Intended Audience :: Developers', |
| 70 | 'License :: OSI Approved :: BSD License', |
| 71 | 'Operating System :: OS Independent', |
| 72 | 'Programming Language :: Python', |
Armin Ronacher | 8ebf1f9 | 2007-03-03 11:22:18 +0100 | [diff] [blame] | 73 | 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', |
| 74 | 'Topic :: Software Development :: Libraries :: Python Modules', |
| 75 | 'Topic :: Text Processing :: Markup :: HTML' |
| 76 | ], |
| 77 | keywords = ['python.templating.engines'], |
Armin Ronacher | 2b76513 | 2007-03-13 16:48:10 +0100 | [diff] [blame] | 78 | packages = ['jinja', 'jinja.translators'], |
Armin Ronacher | 0830e25 | 2007-03-22 23:45:30 +0100 | [diff] [blame^] | 79 | data_files = [ |
| 80 | ('docs', os.listdir('docs/build')), |
| 81 | ('docs/txt', os.listdir('docs/src')) |
| 82 | ], |
| 83 | platforms = 'any', |
| 84 | extras_require = {'plugin': ['setuptools>=0.6a2']} |
Armin Ronacher | de478f6 | 2007-02-28 22:35:04 +0100 | [diff] [blame] | 85 | ) |