{ "info": { "author": "Brandon Orther", "author_email": "an.able.coder@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Topic :: Software Development" ], "description": "=============\npyjade-coffin\n=============\n\nJade_ and Jinja2_ template support for Django using PyJade_'s Jinja2 extension\nwith Coffin_.\n\nPyJade's Django template loader lacks mixin functionality due to the fact\nDjango has no macro support. This package uses Coffin with PyJade's Jinja2\nextension to overcome this. It also provides a few fixes/tweaks to make jade's\nbehavior in Django more closely match the native JavaScript jade engine.\n\nWhat this package does:\n\n* Registers PyJade's Jinja2 extension with coffin so ``.jade`` files are rendered\n though Jinja2 which gives us mixin support.\n\n* Add relative path include support by subclassing ``coffinEnvironment`` and \n overriding the ``join_path`` method. This matches jade's native JavaScript\n engine's behavior.\n\n* Sets Jinja2's autoescape to ``false`` which allows HTML escaping to be handled\n in Jade templates.\n\nInstallation\n============\n\nInstall Package\n---------------\nInstall with pip::\n\n pip install pyjade-coffin\n\n\nSetup Django\n------------\nAdd ``coffin`` and ``pyjade-coffin`` to *INSTALLED_APPS* in ``settings.py``::\n\n INSTALLED_APPS = (\n ...\n 'coffin',\n 'pyjade_coffin',\n ...\n )\n\n\nUsage\n=====\n\nShortcut Render Functions\n-------------------------\nTo render a jade/jinja2 template you can use the render functions in the\n``pyjade_coffin.shortcuts`` module provides:\n\n* render_to_response\n* render\n* render_to_string\n\nThese functions work just like django.shortcuts_' render functions except\nthey render Jade and Jinja2 templates.\n\n**NOTE:** Jade templates are detected by their file extension so only\n``*.jade`` files get processed by PyJade.\n\nHere is an example view::\n\n from django.template import RequestContext\n from pyjade_coffin.shortcuts import render_to_response\n\n\n def test_jade(request):\n c = RequestContext(request, {\n 'test': ['this', 'is', 'test', 'data'],\n 'check': \"Autoescape Test\",\n })\n\n return render_to_response('test_page.jade', c)\n\n\n\n.. _django.shortcuts: https://docs.djangoproject.com/en/dev/topics/http/shortcuts/\n.. _Coffin: https://github.com/coffin/coffin\n.. _Jade: http://jade-lang.com/\n.. _Jinja2: http://jinja.pocoo.org/docs/\n.. _PyJade: https://github.com/SyrusAkbary/pyjade", "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/AbleCoder/pyjade_coffin", "keywords": null, "license": "LICENSE", "maintainer": null, "maintainer_email": null, "name": "pyjade-coffin", "package_url": "https://pypi.org/project/pyjade-coffin/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyjade-coffin/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/AbleCoder/pyjade_coffin" }, "release_url": "https://pypi.org/project/pyjade-coffin/0.1.0.dev/", "requires_dist": null, "requires_python": null, "summary": "Jade and Jinja2 template support for Django using PyJade's Jinja2 extension w/ coffin", "version": "0.1.0.dev" }, "last_serial": 797306, "releases": { "0.1.0.dev": [ { "comment_text": "", "digests": { "md5": "042fce6f5a97225fc1739601f5296d02", "sha256": "fae3f1e3a27907c8890af8b90410341e506cb4aa72c2d685c4ff9b09ef317cf9" }, "downloads": -1, "filename": "pyjade-coffin-0.1.0.dev.tar.gz", "has_sig": false, "md5_digest": "042fce6f5a97225fc1739601f5296d02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6007, "upload_time": "2012-10-14T01:10:58", "url": "https://files.pythonhosted.org/packages/3e/76/139369a1fade18e4d6d8cf1a77d816755dadb00922824ed890cab3d30e73/pyjade-coffin-0.1.0.dev.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "042fce6f5a97225fc1739601f5296d02", "sha256": "fae3f1e3a27907c8890af8b90410341e506cb4aa72c2d685c4ff9b09ef317cf9" }, "downloads": -1, "filename": "pyjade-coffin-0.1.0.dev.tar.gz", "has_sig": false, "md5_digest": "042fce6f5a97225fc1739601f5296d02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6007, "upload_time": "2012-10-14T01:10:58", "url": "https://files.pythonhosted.org/packages/3e/76/139369a1fade18e4d6d8cf1a77d816755dadb00922824ed890cab3d30e73/pyjade-coffin-0.1.0.dev.tar.gz" } ] }