{ "info": { "author": "Cody Soyland", "author_email": "codysoyland@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP" ], "description": "django-phased\r\n=============\r\n\r\n.. image:: https://secure.travis-ci.org/codysoyland/django-phased.png\r\n :alt: Build Status\r\n :target: https://secure.travis-ci.org/codysoyland/django-phased\r\n\r\nA simple two-phase template rendering application useful for caching of authenticated requests.\r\n\r\nHow it works\r\n------------\r\n\r\nThis technique has been desribed by Adrian Holovaty `in this blog post`_\r\nand previously by Honza Kral. The idea is to first render the template with\r\ncertain blocks denoted as \"phased,\" such that they will not be rendered, and\r\nwill remain valid template code that can be rendered with a second pass.\r\n\r\nThe second pass fetches the partially-rendered template from the cache and\r\nperforms a second render on it, using RequestContext to provide user-specific\r\ncontext to the template. This enables very fast generation of pages that have\r\nuser-specific content, by bypassing the need to use the\r\n``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting.\r\n\r\nThis implementation uses a secret delimiter that makes it safe against the\r\npossibility of template code injection vulnerabilities, as it only passes any\r\ngiven text through the template parser once. The phased blocks can also contain\r\ncached context.\r\n\r\n.. _`in this blog post`: http://www.holovaty.com/writing/django-two-phased-rendering/\r\n\r\nBasic Implementation\r\n--------------------\r\n\r\ndjango-phased contains a templatetag, ``phased``, which defines blocks that\r\nare to be parsed during the second phase. A middleware class,\r\nPhasedRenderMiddleware, processes the response to render the parts that were\r\nskipped during the first rendering.\r\n\r\nA special subclass of UpdateCacheMiddleware that drops the \"Vary: Cookie\"\r\nheader from response when it updates the cache is also included, which, if\r\nused in place of the standard UpdateCacheMiddleware will prevent the cache\r\nmiddleware from varying the cache key based on cookies, thus enabling caching\r\nof pages in authenticated sessions.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://django-phased.readthedocs.org/", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-phased", "package_url": "https://pypi.org/project/django-phased/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-phased/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://django-phased.readthedocs.org/" }, "release_url": "https://pypi.org/project/django-phased/0.6.1/", "requires_dist": null, "requires_python": null, "summary": "Simple two-phase template rendering application useful for caching of authenticated requests.", "version": "0.6.1" }, "last_serial": 1910710, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "72e18d1f2dc1d9494b993451b92a27f2", "sha256": "78300d8e5843376df3e70f05f49532c146fbf1f6e0a19a0f8189ab64c8245ee8" }, "downloads": -1, "filename": "django-phased-0.3.0.tar.gz", "has_sig": false, "md5_digest": "72e18d1f2dc1d9494b993451b92a27f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6953, "upload_time": "2010-06-23T21:02:31", "url": "https://files.pythonhosted.org/packages/58/52/e4cbb407b76725e09ddf608ea7ec9f76d4d9cb5cca338b78804025f43dca/django-phased-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "f661e8da551b20a1402656830c482234", "sha256": "7c899d8160219c57a82d1e1557969110af1be0686deadfa4f71332b2f1a24b39" }, "downloads": -1, "filename": "django-phased-0.4.0.tar.gz", "has_sig": false, "md5_digest": "f661e8da551b20a1402656830c482234", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7696, "upload_time": "2010-06-27T19:06:08", "url": "https://files.pythonhosted.org/packages/f0/09/fdbd5b4c0a01a753cdd2b134d25cbff11c9ef929873607ba050dace85839/django-phased-0.4.0.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "6450ac79215160a4a43bb476f73afe39", "sha256": "524c84d08c4933c0b45959b68fc4731507e86df3c20e6706f43e9c733ff9db02" }, "downloads": -1, "filename": "django-phased-0.5.tar.gz", "has_sig": false, "md5_digest": "6450ac79215160a4a43bb476f73afe39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8447, "upload_time": "2010-07-18T00:05:21", "url": "https://files.pythonhosted.org/packages/59/62/dc4fda7333de7929ebfe1f15a31a08ce0a60aa5c4dda1e56b6855ae74936/django-phased-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "f8f789a826b4fa6424710879d525e5f3", "sha256": "321c4c4f8350d8c4032a00e7082a116e916f1be1749dd9f420ba2297e3e416d0" }, "downloads": -1, "filename": "django-phased-0.5.1.tar.gz", "has_sig": false, "md5_digest": "f8f789a826b4fa6424710879d525e5f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9084, "upload_time": "2011-01-27T00:06:05", "url": "https://files.pythonhosted.org/packages/9e/93/b63273a8ab4bd553fb66a95b5cd6f81c00cca3d6c37557b9f44c57a3a873/django-phased-0.5.1.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "bdad933fa75c4418a908a2e3244e62a2", "sha256": "efd7434c2363548b7df35a62aa4dbfebeb6c20abf26bec69d1db9931c81f99db" }, "downloads": -1, "filename": "django-phased-0.6.tar.gz", "has_sig": true, "md5_digest": "bdad933fa75c4418a908a2e3244e62a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10678, "upload_time": "2012-06-29T17:04:00", "url": "https://files.pythonhosted.org/packages/1c/9e/acf3871b75fef6c81046cd3ea150202d12ea72a3b98b8792078c687d0e98/django-phased-0.6.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "44a9f05318b2283669f6eda560896c30", "sha256": "a48b3b314ceb18a5439df3b6ce6331dcf6635b2b77a54a0e823ae5d1b6dc84a4" }, "downloads": -1, "filename": "django-phased-0.6.1.tar.gz", "has_sig": true, "md5_digest": "44a9f05318b2283669f6eda560896c30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11279, "upload_time": "2012-07-11T11:57:35", "url": "https://files.pythonhosted.org/packages/ed/cc/19b2988e29588fd9aaa281c7e93b194f7f38bce5e725a011a08bb03c9d7c/django-phased-0.6.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "44a9f05318b2283669f6eda560896c30", "sha256": "a48b3b314ceb18a5439df3b6ce6331dcf6635b2b77a54a0e823ae5d1b6dc84a4" }, "downloads": -1, "filename": "django-phased-0.6.1.tar.gz", "has_sig": true, "md5_digest": "44a9f05318b2283669f6eda560896c30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11279, "upload_time": "2012-07-11T11:57:35", "url": "https://files.pythonhosted.org/packages/ed/cc/19b2988e29588fd9aaa281c7e93b194f7f38bce5e725a011a08bb03c9d7c/django-phased-0.6.1.tar.gz" } ] }