Camel case JSON support for Django REST framework.
Project description
Django REST Framework JSON CamelCase
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
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-camel-case-1.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 277a4420789ce2a3535dbbacb4f9e95563bd49766ba0068ed06d46d8577ff212 |
|
MD5 | b06076c715c33bdd4a6a1f88cbcce7e0 |
|
BLAKE2b-256 | b1f62873ce51b0bdb106865afa2a07821f9e808988e5d4f38b1be18473c2f1df |