Custom exceptions for Django REST Framework
Project description
Custom exceptions for django rest framework
Compatibility
- work with :
Python 2.7, 3.3, 3.4
Dango 1.7, 1.8
Django Rest Framework >= 3.0
Installation
Install the package from pypi:
pip install djangorestframework-custom-exceptions
Add the application in your django settings:
INSTALLED_APPS = ('rest_framework_custom_exceptions',)
Configure your rest framework :
REST_FRAMEWORK = { 'EXCEPTION_HANDLER': 'rest_framework_custom_exceptions.exceptions.simple_error_handler' }
Example
The simple error handler show exceptions like this :
{ "error": "Not found" }
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for djangorestframework-custom-exceptions-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ce99a2bbc259d4d405bbe3417281e960f5fe5b2d70a622b1d151151a9443e31 |
|
MD5 | 69b883cec15df1f5cc3aa353151ab838 |
|
BLAKE2b-256 | ed30d2386fc97ca85331ea7ab1d87da8dad5506206ea0f0c0c9796d3194915b2 |