# django-errors [![PyPi license](https://img.shields.io/pypi/l/django-errors.svg)](https://pypi.python.org/pypi/django_errors)
[![PyPi status](https://img.shields.io/pypi/status/django-errors.svg)](https://pypi.python.org/pypi/django_errors)
[![PyPi version](https://img.shields.io/pypi/v/django-errors.svg)](https://pypi.python.org/pypi/django_errors)
[![PyPi python version](https://img.shields.io/pypi/pyversions/django-errors.svg)](https://pypi.python.org/pypi/django_errors)
[![PyPi downloads](https://img.shields.io/pypi/dm/django-errors.svg)](https://pypi.python.org/pypi/django_errors)
[![PyPi downloads](https://img.shields.io/pypi/dw/django-errors.svg)](https://pypi.python.org/pypi/django_errors)
[![PyPi downloads](https://img.shields.io/pypi/dd/django-errors.svg)](https://pypi.python.org/pypi/django_errors)
## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-errors.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-errors.svg)
## Test [![codecov.io](https://codecov.io/github/DLRSP/django-errors/coverage.svg?branch=main)](https://codecov.io/github/DLRSP/django-errors?branch=main) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-errors/main.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-errors/main) [![gitthub.com](https://github.com/DLRSP/django-errors/actions/workflows/ci.yaml/badge.svg)](https://github.com/DLRSP/django-errors/actions/workflows/ci.yaml)
## Check Demo Project
* Browser the demo app on-line on [Heroku](https://django-errors.herokuapp.com/)
* Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-errors)
## Requirements
- Python 3.8+ supported.
- Django 3.2+ supported.
## Setup
1. Install from **pip**:
```shell
pip install django-errors
```
2. modify `settings.py` by adding the app to `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
# ...
"django_errors",
# ...
]
```
3. Finally, modify your project `urls.py` with handlers for all errors:
```python
# ...other imports...
from django_errors import views as errors_views
urlpatterns = [
# ...other urls...
]
handler400 = errors_views.custom_400
""" Handle 400 error """
handler403 = errors_views.custom_403
""" Handle 403 error """
handler404 = errors_views.custom_404
""" Handle 404 error """
handler500 = errors_views.custom_500
""" Handle 500 error """
```
## Run Example Project
```shell
git clone --depth=50 --branch=django-errors https://github.com/DLRSP/example.git DLRSP/example
cd DLRSP/example
python manage.py runserver
```
Now browser the app @ http://127.0.0.1:8000
Raw data
{
"_id": null,
"home_page": "https://github.com/DLRSP/django-errors",
"name": "django-errors",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "django,errors",
"author": "DLRSP",
"author_email": "dlrsp.dev@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e1/66/0a91ba4e74b69fd559f0f4579f5a727fa288b25260f627f539cc41537fa0/django-errors-2.3.5.tar.gz",
"platform": null,
"description": "# django-errors [![PyPi license](https://img.shields.io/pypi/l/django-errors.svg)](https://pypi.python.org/pypi/django_errors)\n\n[![PyPi status](https://img.shields.io/pypi/status/django-errors.svg)](https://pypi.python.org/pypi/django_errors)\n[![PyPi version](https://img.shields.io/pypi/v/django-errors.svg)](https://pypi.python.org/pypi/django_errors)\n[![PyPi python version](https://img.shields.io/pypi/pyversions/django-errors.svg)](https://pypi.python.org/pypi/django_errors)\n[![PyPi downloads](https://img.shields.io/pypi/dm/django-errors.svg)](https://pypi.python.org/pypi/django_errors)\n[![PyPi downloads](https://img.shields.io/pypi/dw/django-errors.svg)](https://pypi.python.org/pypi/django_errors)\n[![PyPi downloads](https://img.shields.io/pypi/dd/django-errors.svg)](https://pypi.python.org/pypi/django_errors)\n\n## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-errors.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-errors.svg)\n\n## Test [![codecov.io](https://codecov.io/github/DLRSP/django-errors/coverage.svg?branch=main)](https://codecov.io/github/DLRSP/django-errors?branch=main) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-errors/main.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-errors/main) [![gitthub.com](https://github.com/DLRSP/django-errors/actions/workflows/ci.yaml/badge.svg)](https://github.com/DLRSP/django-errors/actions/workflows/ci.yaml)\n\n## Check Demo Project\n* Browser the demo app on-line on [Heroku](https://django-errors.herokuapp.com/)\n* Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-errors)\n\n## Requirements\n- Python 3.8+ supported.\n- Django 3.2+ supported.\n\n## Setup\n1. Install from **pip**:\n```shell\npip install django-errors\n```\n\n2. modify `settings.py` by adding the app to `INSTALLED_APPS`:\n```python\nINSTALLED_APPS = [\n # ...\n \"django_errors\",\n # ...\n]\n```\n\n3. Finally, modify your project `urls.py` with handlers for all errors:\n```python\n# ...other imports...\nfrom django_errors import views as errors_views\n\nurlpatterns = [\n # ...other urls...\n]\n\nhandler400 = errors_views.custom_400\n\"\"\" Handle 400 error \"\"\"\n\nhandler403 = errors_views.custom_403\n\"\"\" Handle 403 error \"\"\"\n\nhandler404 = errors_views.custom_404\n\"\"\" Handle 404 error \"\"\"\n\nhandler500 = errors_views.custom_500\n\"\"\" Handle 500 error \"\"\"\n```\n\n\n## Run Example Project\n\n```shell\ngit clone --depth=50 --branch=django-errors https://github.com/DLRSP/example.git DLRSP/example\ncd DLRSP/example\npython manage.py runserver\n```\n\nNow browser the app @ http://127.0.0.1:8000\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Django application for handling server errors.",
"version": "2.3.5",
"project_urls": {
"Homepage": "https://github.com/DLRSP/django-errors"
},
"split_keywords": [
"django",
"errors"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f77301c75b07959ccffb2a02d6152f604547bcde2da1a9ffc4cb85fe257f289c",
"md5": "f3ecf634a32e832da9e693715ebd31d2",
"sha256": "a316342c25204d00aee8efb61b01c60dbaab408bd81dce390735d2b067a8ac87"
},
"downloads": -1,
"filename": "django_errors-2.3.5-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "f3ecf634a32e832da9e693715ebd31d2",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.8",
"size": 19229,
"upload_time": "2023-08-04T23:17:02",
"upload_time_iso_8601": "2023-08-04T23:17:02.569279Z",
"url": "https://files.pythonhosted.org/packages/f7/73/01c75b07959ccffb2a02d6152f604547bcde2da1a9ffc4cb85fe257f289c/django_errors-2.3.5-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e1660a91ba4e74b69fd559f0f4579f5a727fa288b25260f627f539cc41537fa0",
"md5": "650c0aec5eb0435d6791fce5cbef7143",
"sha256": "be999f837dfd75200c060b189a6d73660bf345113bfe8e17b84e51fd78faa6e9"
},
"downloads": -1,
"filename": "django-errors-2.3.5.tar.gz",
"has_sig": false,
"md5_digest": "650c0aec5eb0435d6791fce5cbef7143",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 37170,
"upload_time": "2023-08-04T23:17:04",
"upload_time_iso_8601": "2023-08-04T23:17:04.551649Z",
"url": "https://files.pythonhosted.org/packages/e1/66/0a91ba4e74b69fd559f0f4579f5a727fa288b25260f627f539cc41537fa0/django-errors-2.3.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-04 23:17:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DLRSP",
"github_project": "django-errors",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "django-errors"
}