Skip to main content

Format errors in Django Rest Framework

Project description

DRF Errors formatter

This is a exception handlers error formating for Django REST Framework which allows you to format errors in all project.

Requirements

  • Python (3.6+)
  • Django (2.0+)
  • djangorestframework (3.8+)

Installation

pip install drf-errors-formatter

Usage

/home/thomas/Desktop/drf-errors-formatter/drf_handlers/formatter.py Add formatter to DRF settings

REST_FRAMEWORK = {
    'EXCEPTION_HANDLER': 'drf_handlers.formatter.errors_exception_handler'
}

Authors

2021, Thomas

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drf-errors-formatter-1.0.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

drf_errors_formatter-1.0.1-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page