{ "info": { "author": "James Roe", "author_email": "roejames12@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP" ], "description": "Django Error Pages\n==================\n\nDjango Error Pages extends Django to allow you to raise and handle any type of\nHTTP error, such as 400, and 403.\n\nIt behaves just like the default Django 404 and 500 error pages, which render\n404.html and 500.html respectively inside your apps template folder, but display\nsome information in DEBUG mode.\n\nIt will catch all Django error codes and return an error page.\n\nIt is very flexible, and covers a wide range of error codes:\n400-418, 422-426,\n500-505, 507, 509, 510\n\nConfigurability & Extendibility\n-------------------------------\n\nDjango Error Pages is very easy to use!\n\nHow easy it is to raise a 403 forbidden:\n\n```python\nfrom django.shortcuts import render_to_response\n\nfrom error_pages.http import Http403\n\ndef homepage(request):\n if user is unauthorized:\n raise Http403\n return render_to_response('index.html')\n```\n\nAnd of course, it'll render a 403.html template for you if DEBUG mode is off.\n\nAlso, I don't think Django handles some certain error pages, such as 400, 403,\n(which shows some default error, but isn't overridable). So we now is included\nthe ability to render your Django template error pages directly from Apache!\nIt will render just as if Django was rendering a 404 page. Just place the\ncorresponding 400.html page into the template folder in your app, and add this\nrule to your Apache configuration. You can do this with ANY error code you want,\njust like you can raise any error code you want; why should anyone be restricted? :)\n\n```apacheconf\nErrorDocument 400 /__errorpage__/400\n```\n\nConfiguring & Setting up\n------------------------\n\n* Add it to your middleware\n\n```python\nMIDDLEWARE_CLASSES = (\n ...\n 'error_pages.middleware.ErrorPageMiddleware',\n)\n```\n\n* And add the URL configuration to your root URL's\n\n```python\nfrom django.conf.urls.defaults import patterns, url\n\nurlpatterns = patterns('',\n ...\n url(r'^__errorpage__/(?P\\d+)$', 'error_pages.views.display_error'),\n)\n```\n\nInstalling\n----------\n\n* Download django-error-pages from https://github.com/Roejames12/django-error-pages/tarball/master\n* Or `pip install django-error-pages`\n* `pip install django-error-pages==dev` for the absolute bleeding edge.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Roejames12/django-error-pages/", "keywords": null, "license": "GNU General Public License (GPL)", "maintainer": null, "maintainer_email": null, "name": "django-error-pages", "package_url": "https://pypi.org/project/django-error-pages/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-error-pages/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Roejames12/django-error-pages/" }, "release_url": "https://pypi.org/project/django-error-pages/0.4/", "requires_dist": null, "requires_python": null, "summary": "Use any HTTP error status with Django.", "version": "0.4" }, "last_serial": 802906, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "53377be8c17596b804ff8ec31c3327d4", "sha256": "79333115fb4574325845635bb4098e1463b63f92799bf8699c298b11e246078c" }, "downloads": -1, "filename": "django-error-pages-0.1.tar.gz", "has_sig": false, "md5_digest": "53377be8c17596b804ff8ec31c3327d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20375, "upload_time": "2011-05-26T07:15:53", "url": "https://files.pythonhosted.org/packages/5e/c6/4893d35c1d033fecf98f26070187aec9881ee689e9bb8852f63611b011d9/django-error-pages-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "6cb6a48fb72ecbcf5129022565ea7be4", "sha256": "0fdf49467820964c4d80594dd1a28509e125164a6b4c2fc684bcb53c9fdede9c" }, "downloads": -1, "filename": "django-error-pages-0.2.tar.gz", "has_sig": false, "md5_digest": "6cb6a48fb72ecbcf5129022565ea7be4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20381, "upload_time": "2011-05-26T09:34:09", "url": "https://files.pythonhosted.org/packages/62/e8/479aeced798a34f96ccf29ff3516d3907ca8e447b03be7262a036c294717/django-error-pages-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "8bab4a07f14b71b61857a4e60b2bd9fd", "sha256": "0f23af4685ba81e447f8ff2914966581a7b48a1fe9a18be0098fe70f9cafc89e" }, "downloads": -1, "filename": "django-error-pages-0.3.tar.gz", "has_sig": false, "md5_digest": "8bab4a07f14b71b61857a4e60b2bd9fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20853, "upload_time": "2011-05-26T13:55:25", "url": "https://files.pythonhosted.org/packages/2a/82/8f957b4892c7db38c9596385741e83a088759eee86282b92b40a8dbb8ec9/django-error-pages-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "9cb0eb048085a483dd29232176e6647e", "sha256": "24824cb8cc5250a411556e0621027b7b0cdb9a52870fbff848cb8268961b775a" }, "downloads": -1, "filename": "django-error-pages-0.4.tar.gz", "has_sig": false, "md5_digest": "9cb0eb048085a483dd29232176e6647e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21244, "upload_time": "2011-05-27T00:46:52", "url": "https://files.pythonhosted.org/packages/08/d9/072f110cb2a20e33952dae2176f57b161539c2752d720e5c4fc388e6b180/django-error-pages-0.4.tar.gz" } ], "dev": [] }, "urls": [ { "comment_text": "", "digests": { "md5": "9cb0eb048085a483dd29232176e6647e", "sha256": "24824cb8cc5250a411556e0621027b7b0cdb9a52870fbff848cb8268961b775a" }, "downloads": -1, "filename": "django-error-pages-0.4.tar.gz", "has_sig": false, "md5_digest": "9cb0eb048085a483dd29232176e6647e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21244, "upload_time": "2011-05-27T00:46:52", "url": "https://files.pythonhosted.org/packages/08/d9/072f110cb2a20e33952dae2176f57b161539c2752d720e5c4fc388e6b180/django-error-pages-0.4.tar.gz" } ] }