{ "info": { "author": "GW", "author_email": "gw.2011@tnode.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "django-urlalternatives - Alternative Django views under same URL pattern\r\n========================================================================\r\n\r\nDjango URL alternatives provides a way for dispatching one URL pattern to the\r\nfirst alternative view (callback function) in a list that returns success.\r\n\r\n:version: 0.1 (or corresponding Mercurial revision hash)\r\n:web: http://gw.tnode.com/0483-Django/\r\n:author: GW \r\n:license: GPLv3+\r\n:keywords: url alternatives, dispatcher, views, django, urlconf, same pattern\r\n\r\nDescription\r\n===========\r\n\r\nIn case you want to assing in an URLconf the same URL pattern to more than one\r\nview (or callback function), such that the next ones are fallbacks in case of\r\nerrors (ie. HTTP response codes >= 400). This is often the case when combining\r\ndifferent apps with dynamic URLs (such as CMSs) and you want to respond with the\r\none that has that content.\r\n\r\nUsage\r\n=====\r\n\r\nAs you can see from the following example the URL alternatives dispatcher is\r\nsimply used as part of the ``urlpatterns`` variable in ``urls.py`` and supports\r\npassing of positional and keyword arguments, eg.:\r\n\r\n urlpatterns += pattern('',\r\n (r'^', 'urlalternatives.views.dispatcher', {'callbacks':[\r\n app1.views.failing404,\r\n 'app2.views.working',\r\n (redirect_to, [], {'url':'/'}),\r\n\r\n ]}),\r\n\r\n )", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://gw.tnode.com/0483-Django/", "keywords": "url alternatives, dispatcher, views, django, urlconf, same pattern", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "django-urlalternatives", "package_url": "https://pypi.org/project/django-urlalternatives/", "platform": "Django", "project_url": "https://pypi.org/project/django-urlalternatives/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://gw.tnode.com/0483-Django/" }, "release_url": "https://pypi.org/project/django-urlalternatives/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Django URL alternatives provides a way for dispatching one URL pattern to the first alternative view (callback function) in a list that returns success.", "version": "0.1.0" }, "last_serial": 790946, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "631527df9e00d126cd4492fe324b067d", "sha256": "b53a74fed5389abbdc3923a228d04d6f4f1ad952a7d3196863a4171ebfec1523" }, "downloads": -1, "filename": "django-urlalternatives-0.1.0.tar.gz", "has_sig": false, "md5_digest": "631527df9e00d126cd4492fe324b067d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14965, "upload_time": "2011-07-07T23:24:05", "url": "https://files.pythonhosted.org/packages/09/e6/afa9dd9111527fe36efa7b34f95daa4f7dc82df50ad02f83c47887967fa2/django-urlalternatives-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "631527df9e00d126cd4492fe324b067d", "sha256": "b53a74fed5389abbdc3923a228d04d6f4f1ad952a7d3196863a4171ebfec1523" }, "downloads": -1, "filename": "django-urlalternatives-0.1.0.tar.gz", "has_sig": false, "md5_digest": "631527df9e00d126cd4492fe324b067d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14965, "upload_time": "2011-07-07T23:24:05", "url": "https://files.pythonhosted.org/packages/09/e6/afa9dd9111527fe36efa7b34f95daa4f7dc82df50ad02f83c47887967fa2/django-urlalternatives-0.1.0.tar.gz" } ] }