Skip to main content

Camel case JSON support for Django REST framework.

Project description

Django REST Framework JSON CamelCase

https://travis-ci.org/vbabiy/djangorestframework-camel-case.png?branch=master https://badge.fury.io/py/djangorestframework-camel-case.svg

Camel case JSON support for Django REST framework.

Installation

At the command line:

$ pip install djangorestframework-camel-case

Add the render and parser to your django settings file.

# ...
REST_FRAMEWORK = {

    'DEFAULT_RENDERER_CLASSES': (
        'djangorestframework_camel_case.render.CamelCaseJSONRenderer',
        # Any other renders
    ),

    'DEFAULT_PARSER_CLASSES': (
        'djangorestframework_camel_case.parser.CamelCaseJSONParser',
        # Any other parsers
    ),
}
# ...

DRF < 3.0 Swapping Renderer

By default the package uses rest_framework.renderers.JSONRenderer. If you want to use another renderer (the only possible alternative is rest_framework.renderers.JSONRenderer), you must specify it in your django settings file.

# ...
JSON_CAMEL_CASE = {
    'RENDERER_CLASS': 'rest_framework.renderers.UnicodeJSONRenderer'
}
# ...

Running Tests

To run the current test suite, execute the following from the root of he project:

$ python -m unittest discover

License

  • Free software: BSD license

History

0.1.0 (2013-12-20)

  • First release on PyPI.

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

djangorestframework-camel-case-1.0b1.tar.gz (4.4 kB view hashes)

Uploaded Source

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