{ "info": { "author": "CobraTeam", "author_email": "francisco@franciscosouza.net", "bugtrack_url": null, "classifiers": [], "description": "Roan\n====\n\nRoan is a per-model url purging Django app. It connects to model signals and purge URLs wherever a model is saved, updated or deleted.\n\nGetting started\n---------------\n\nInstallation\n++++++++++++\n\nYou can install ``Roan`` using pip:\n\n::\n\n $ [sudo] pip install roan\n\nThe only dependency is `requests `_, that will be installed automatically by ``pip`` (if you don't use the ``--no-deps`` argument).\n\nConfiguration\n+++++++++++++\n\n``Roan`` uses only an optional setting: ``ROAN_PURGE_URL``. If you don't specify it, it'll be ``http://localhost/purge``.\n\nExample of configuration:\n\n::\n\n ROAN_PURGE_URL = 'http://nginx.souza.cc/clean'\n\nnginx proxy_cache support\n-------------------------\n\nSince Roan is based on a personal need, it's based on nginx's `proxy_cache `_.\n\nSuppose you have the following purge mapping:\n\n::\n\n location ~ /purge(/.*) {\n allow 127.0.0.1;\n deny all;\n proxy_cache_purge roan \"$scheme://$host$1\";\n }\n\nNow suppose you have the following `Django `_ model:\n\n::\n\n class Post(models.Model):\n title = models.CharField(max_length=100)\n content = models.TextField()\n\nAnd you have a URL ``/posts`` where users can see a list of posts. How can you set a forever cache and expect the cache to be refreshed\nwhenever a new post is saved? Or whenever a post gets updated or deleted?\n\nUsing Roan you'll be able to connect one or more models to one or more URL. So you can connect the ``Post`` model with the ``/posts`` URL,\nand whenever a Post gets saved, updated or deleted, Roan makes a request to the ``/purge/posts`` URL.\n\nUsage\n-----\n\nOnce you have Roan installed and configured, you just need to call it in a file that Django executes (e.g.: the ``models.py`` of your app).\nHere is the code for the example above, of purging the ``/posts`` URL whenever a post gets saved or deleted:\n\n::\n\n from roan import purge\n from models import Post\n\n purge(\"/posts\").on_save(Post)\n purge(\"/posts\").on_delete(Post)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "roan", "package_url": "https://pypi.org/project/roan/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/roan/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/roan/0.1/", "requires_dist": null, "requires_python": null, "summary": "Django per-model cache purging", "version": "0.1" }, "last_serial": 798993, "releases": { "0.0.1": [], "0.1": [ { "comment_text": "", "digests": { "md5": "548d6567c98bb9d73cd94c6716977500", "sha256": "fa30259ad45add5c6565ede4e1e467f6612c3d0a287709c565a90c9862e88e8f" }, "downloads": -1, "filename": "roan-0.1.tar.gz", "has_sig": false, "md5_digest": "548d6567c98bb9d73cd94c6716977500", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2458, "upload_time": "2011-11-10T14:33:10", "url": "https://files.pythonhosted.org/packages/35/66/f8aad53825572176349f055a6a65940d7a381a5a0c46537cda972325b01f/roan-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "548d6567c98bb9d73cd94c6716977500", "sha256": "fa30259ad45add5c6565ede4e1e467f6612c3d0a287709c565a90c9862e88e8f" }, "downloads": -1, "filename": "roan-0.1.tar.gz", "has_sig": false, "md5_digest": "548d6567c98bb9d73cd94c6716977500", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2458, "upload_time": "2011-11-10T14:33:10", "url": "https://files.pythonhosted.org/packages/35/66/f8aad53825572176349f055a6a65940d7a381a5a0c46537cda972325b01f/roan-0.1.tar.gz" } ] }