{ "info": { "author": "Syrus Akbary Nieto", "author_email": "me@syrusakbary.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "======\nDjinja\n======\n\nDjinja tries to **integrate Jinja2 in Django**. The aim is to replace\ncompletely the Django's template system, **including administration**.\n\nCurrently, the following templating modules have been written and are working:\n\n- Django administration\n- Django Debug Toolbar\n\nIn a near future, you could convert **Django templates syntax to Jinja2 syntax**, isn't awesome?\n\nIf you have ideas please let us know.\n\nInstallation\n============\n\n#. Add the `djinja` directory to your Python path.\n\n#. Add the following template loader (**AT TOP OF TEMPLATE_LOADERS**) to your project's `settings.py` file:\n\n\t``'djinja.template.loaders.Loader',``\n\n Tying into template loaders allows Djinja to manage automatically **ALL**\n the templates with Jinja2 (including Django templates)\n\n Note: If you don't install djinja.contrib.admin when you try to access\n to the Django administration you will get an error, this is caused because\n the Django administration templates are not adapted for Jinja2.\n \n#. That's all! ;)\n\n\n**IMPORTANT**: You have to adapt your website templates to Jinja2 or you\nwill get an error when rendering (until the djinja converser is ready).\n\nCustom filters and extensions\n=============================\n\nDjinja uses the same templatetag library approach as Django, meaning\nyour app has a ``templatetags`` directory, and each of it's modules\nrepresents a \"template library\", providing new filters and tags.\n\nA custom ``Library`` class in ``djinja.template.Library`` can be used\nto register Jinja-specific components.\n\nDjinja can automatically make your existing Django filters usable in\nJinja, but not your custom tags - you need to rewrite those as Jinja\nextensions manually.\n\nExample for a Jinja-enabled template library::\n\n from djinja import template\n register = template.Library()\n\n register.filter(plenk, 'plenk') \t\t# Filter function\n register.extension(FooExtension) \t# Jinja version of the tag\n register.tag(my_function_name) \t\t# A global function/object\n register.set(a='hello') \t\t\t# A context variable (named a)\n\nYou may also define additional extensions, filters, tests, and globas via your ``settings.py``::\n\n JINJA2_FILTERS = (\n 'path.to.myfilter',\n )\n JINJA2_EXTENSIONS = (\n 'jinja2.ext.do',\n )\n\nHAML\n====\n\nDjinja can render HAML pages (having installed ``HamlPy`` - https://github.com/jessemiller/HamlPy), and is as just simple as put the .haml extension to your template and adding ``'djinja.template.extensions.haml'`` in the JINJA2_EXTENSIONS variable of your settings::\n\n\n JINJA2_EXTENSIONS = (\n\t...\n 'djinja.template.extensions.haml',\n\t...\n )\n\n**HAML templates can also include,extend,etc HTML templates and viceversa.**\n\nAdministration\n==============\n\nFor install the Django administration Jinja2 templating just add ``'djinja.contrib.admin',`` before 'django.contrib.admin' in your INSTALLED_APPS in `settings.py`.\n\nExample configuration::\n\n\tINSTALLED_APPS = (\n\t ...\n\t 'djinja.contrib.admin',\n\t 'django.contrib.admin',\n\t ...\n\t)\n\n\nBenchmarking\n------------\n\nRunning tests::\n\t\n\tab -n100 http://localhost/admin/\n\t\t\nIn Django\n\t\t\n\tRequests per second: 67.93 [#/sec] (mean)\n\tTime per request: 14.721 [ms] (mean)\n\nWith Jinja2 (Djinja)\n\t\t\n\tRequests per second: 202.16 [#/sec] (mean)\n\tTime per request: 4.947 [ms] (mean)\n\n\n**3x performance using Jinja2 instead of Django templating in administration**\n\nDjango Debug Toolbar\n====================\n\nFor install the Django Debug Toolbar Jinja2 templating just add ``'djinja.contrib.debug_toolbar',`` before 'debug_toolbar' in your INSTALLED_APPS in `settings.py`.\n\nExample configuration::\n\n\tINSTALLED_APPS = (\n\t ...\n\t 'djinja.contrib.debug_toolbar',\n\t 'debug_toolbar',\n\t ...\n\t)\n\nTODOs and BUGS\n==============\nSee: http://github.com/syrusakbary/djinja/issues", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/syrusakbary/djinja", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "Djinja", "package_url": "https://pypi.org/project/Djinja/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Djinja/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/syrusakbary/djinja" }, "release_url": "https://pypi.org/project/Djinja/0.7/", "requires_dist": null, "requires_python": null, "summary": "A package that makes possible the integration of Jinja2 in Django, in a clean way.", "version": "0.7" }, "last_serial": 784153, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "0b161d86e321f99fdd958e120e4aaeb2", "sha256": "76cd777953c5086b3f8d2079122de3f2c90d8f0ea3dac4581f875c95aa505da0" }, "downloads": -1, "filename": "Djinja-0.2.1.macosx-10.6-x86_64.exe", "has_sig": false, "md5_digest": "0b161d86e321f99fdd958e120e4aaeb2", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 112618, "upload_time": "2011-03-31T20:47:27", "url": "https://files.pythonhosted.org/packages/13/ef/9bc9d705e1d62e29683ca6705effaaaeb40ef306b5ff70f315bd6f668db2/Djinja-0.2.1.macosx-10.6-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "bc22590c8792951ec8ebb763a8f8b444", "sha256": "8f7a5cf86b244d1b7225a017ad5327b3eae9c2d8280d2e44ddf894c3b88e99d2" }, "downloads": -1, "filename": "Djinja-0.2.1.tar.gz", "has_sig": false, "md5_digest": "bc22590c8792951ec8ebb763a8f8b444", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29038, "upload_time": "2011-03-31T20:47:25", "url": "https://files.pythonhosted.org/packages/cb/9c/d32e6389740c2ef643162a399088e146a4b37b58914475ffb69e222f76da/Djinja-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "cb7d105354ec469e60f7387cd8a7f7de", "sha256": "382f51d635be7e5d64f7a3fa43096c1f63e92a66e28f83af0b4701c316432720" }, "downloads": -1, "filename": "Djinja-0.2.2.tar.gz", "has_sig": false, "md5_digest": "cb7d105354ec469e60f7387cd8a7f7de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29266, "upload_time": "2011-04-01T01:00:31", "url": "https://files.pythonhosted.org/packages/0f/81/db4756ded2a841416517cb7d85a321b3e38109da4e3ccf0a71743f1586b2/Djinja-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "3b9197deeb4b4349a77e9bffcacd60ee", "sha256": "153f2015bf0f04a02893f02e88fdf7c34b0218c1f851b889afbe661c6e643891" }, "downloads": -1, "filename": "Djinja-0.3.0.tar.gz", "has_sig": false, "md5_digest": "3b9197deeb4b4349a77e9bffcacd60ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31798, "upload_time": "2011-04-03T02:26:10", "url": "https://files.pythonhosted.org/packages/e9/97/5609f053522c9e68af1c5d2b55552ac4618667917a1e487a3013a434e3ca/Djinja-0.3.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "402704b94e1f0b08e6fc2dd080adb134", "sha256": "fd4e9c8634a1d3fa2dd051e4953ca9904b11b9d5e5e4942816ce66376c1055d2" }, "downloads": -1, "filename": "Djinja-0.5.0.tar.gz", "has_sig": false, "md5_digest": "402704b94e1f0b08e6fc2dd080adb134", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33349, "upload_time": "2011-04-30T03:49:29", "url": "https://files.pythonhosted.org/packages/58/fa/6c38c7a90d2b6495a5cef75e349d05a1a0deac8b1268f1289cd0d9d132b4/Djinja-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "b9c0e3088cfb930edb8f690acd59e051", "sha256": "72a1f99c50eb90398ee4f230b8824bf39d158a460ded233a5e1afeafec1e1591" }, "downloads": -1, "filename": "Djinja-0.5.1.tar.gz", "has_sig": false, "md5_digest": "b9c0e3088cfb930edb8f690acd59e051", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31453, "upload_time": "2011-05-14T12:41:45", "url": "https://files.pythonhosted.org/packages/c5/f0/27b230b13a5d25daf14e9c2c37eb15d153ec705a04672c574b2c0d5b37a7/Djinja-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "a85f847990ec07b096068a68538832e4", "sha256": "6992d94fc72ae1146f3e43a30b96c7022141f2088d79086f1e540ebea0ff51f0" }, "downloads": -1, "filename": "Djinja-0.5.2.tar.gz", "has_sig": false, "md5_digest": "a85f847990ec07b096068a68538832e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31260, "upload_time": "2011-05-18T22:08:50", "url": "https://files.pythonhosted.org/packages/f4/fc/7e268407cdee01a3517d4df45ced7ec92e1b21988b20e2ea0e08e54d44d1/Djinja-0.5.2.tar.gz" } ], "0.5.5": [ { "comment_text": "", "digests": { "md5": "466566dac07f238e98c60db456cac6f4", "sha256": "f50860f8539a0a9af73bb1a7dfd45e4bb81b7025bd5d373eec0cc10e0e6d2cff" }, "downloads": -1, "filename": "Djinja-0.5.5.tar.gz", "has_sig": false, "md5_digest": "466566dac07f238e98c60db456cac6f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32391, "upload_time": "2011-05-25T01:42:19", "url": "https://files.pythonhosted.org/packages/9f/98/56f32870a68733a59166513986238d26d2412338b6c7bd6e95a3377f45a8/Djinja-0.5.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "ecbaec483ff43352521cce411917ae2d", "sha256": "b2e05e2a63ea9d1c77476bca8ffe0e5a90313959dc689594ac068051e62d253e" }, "downloads": -1, "filename": "Djinja-0.6.tar.gz", "has_sig": false, "md5_digest": "ecbaec483ff43352521cce411917ae2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37157, "upload_time": "2011-06-09T21:57:45", "url": "https://files.pythonhosted.org/packages/a3/c1/b003630f8e5daa74977e61160d48794000f633524fa7bc9dd4fb55772da9/Djinja-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "f92a755157010b5862ba523f772cf888", "sha256": "97b5725b67da9f48ae70fc5bc91b2ce4b02faa5816f76455234d287ec094502f" }, "downloads": -1, "filename": "Djinja-0.7.tar.gz", "has_sig": false, "md5_digest": "f92a755157010b5862ba523f772cf888", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36313, "upload_time": "2011-09-03T22:10:52", "url": "https://files.pythonhosted.org/packages/69/91/d26d7ab656dc077cc8ea90424afd095b188f63950d0451121042fad6a03a/Djinja-0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f92a755157010b5862ba523f772cf888", "sha256": "97b5725b67da9f48ae70fc5bc91b2ce4b02faa5816f76455234d287ec094502f" }, "downloads": -1, "filename": "Djinja-0.7.tar.gz", "has_sig": false, "md5_digest": "f92a755157010b5862ba523f772cf888", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36313, "upload_time": "2011-09-03T22:10:52", "url": "https://files.pythonhosted.org/packages/69/91/d26d7ab656dc077cc8ea90424afd095b188f63950d0451121042fad6a03a/Djinja-0.7.tar.gz" } ] }