Metadata-Version: 2.1
Name: djangorestframework-custom-exceptions
Version: 1.0.2
Summary: Custom exceptions for Django REST Framework
Home-page: https://github.com/unistra/django-rest-framework-custom-exceptions
Download-URL: https://pypi.python.org/pypi/djangorestframework-custom-exceptions
Author: Morgan Bohn
Author-email: morgan.bohn@unistra.fr
Maintainer: Morgan Bohn
Maintainer-email: morgan.bohn@unistra.fr
Keywords: django,REST,rest_framework,exceptions
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
License-File: LICENSE

django-rest-custom-exceptions
======================================

Custom exceptions for django rest framework

Compatibility
-------------

Works with :

  * Python 2.7, 3.4, 3.5, 3.6
  * Django >= 1.10
  * Django Rest Framework >= 3.5

.. image:: https://travis-ci.org/unistra/django-rest-framework-custom-exceptions.svg?branch=master
    :target: https://travis-ci.org/unistra/django-rest-framework-custom-exceptions

.. image:: https://coveralls.io/repos/github/unistra/django-rest-framework-custom-exceptions/badge.svg?branch=master
    :target: https://coveralls.io/github/unistra/django-rest-framework-custom-exceptions?branch=master

.. image:: https://landscape.io/github/unistra/django-rest-framework-custom-exceptions/master/landscape.svg?style=flat
    :target: https://landscape.io/github/unistra/django-rest-framework-custom-exceptions/master
    :alt: Code Health


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"
    }

