@@ -4,20 +4,20 @@ JSON API and Django Rest Framework
44
55.. image :: https://travis-ci.org/django-json-api/django-rest-framework-json-api.svg?branch=develop
66 :target: https://travis-ci.org/django-json-api/django-rest-framework-json-api
7-
7+
88.. image :: https://readthedocs.org/projects/django-rest-framework-json-api/badge/?version=latest
99 :alt: Read the docs
1010 :target: http://django-rest-framework-json-api.readthedocs.org/
11-
11+
1212.. image :: https://codeclimate.com/github/django-json-api/django-rest-framework-json-api/badges/gpa.svg
1313 :target: https://codeclimate.com/github/django-json-api/django-rest-framework-json-api
1414 :alt: Code Climate
15-
15+
1616.. image :: https://badges.gitter.im/Join%20Chat.svg
1717 :alt: Join the chat at https://gitter.im/django-json-api/django-rest-framework-json-api
1818 :target: https://gitter.im/django-json-api/django-rest-framework-json-api
1919
20-
20+
2121Documentation: http://django-rest-framework-json-api.readthedocs.org/
2222
2323Live demo (resets every hour): http://json-api.jerel.co/
@@ -128,28 +128,22 @@ One can either add ``rest_framework_json_api.parsers.JSONParser`` and
128128``rest_framework_json_api.renderers.JSONRenderer `` to each ``ViewSet `` class, or
129129override ``settings.REST_FRAMEWORK ``::
130130
131-
132- REST_FRAMEWORK = {
133- 'PAGINATE_BY': 10,
134- 'PAGINATE_BY_PARAM': 'page_size',
135- 'MAX_PAGINATE_BY': 100,
136- # DRF v3.1+
137- 'DEFAULT_PAGINATION_CLASS':
138- 'rest_framework_json_api.pagination.PageNumberPagination',
139- # older than DRF v3.1
140- 'DEFAULT_PAGINATION_SERIALIZER_CLASS':
141- 'rest_framework_json_api.pagination.PaginationSerializer',
142- 'DEFAULT_PARSER_CLASSES': (
143- 'rest_framework_json_api.parsers.JSONParser',
144- 'rest_framework.parsers.FormParser',
145- 'rest_framework.parsers.MultiPartParser'
146- ),
147- 'DEFAULT_RENDERER_CLASSES': (
148- 'rest_framework_json_api.renderers.JSONRenderer',
149- 'rest_framework.renderers.BrowsableAPIRenderer',
150- ),
151- 'DEFAULT_METADATA_CLASS': 'rest_framework_json_api.metadata.JSONAPIMetadata',
152- }
131+ REST_FRAMEWORK = {
132+ 'PAGE_SIZE': 10,
133+ 'EXCEPTION_HANDLER': 'rest_framework_json_api.exceptions.exception_handler',
134+ 'DEFAULT_PAGINATION_CLASS':
135+ 'rest_framework_json_api.pagination.PageNumberPagination',
136+ 'DEFAULT_PARSER_CLASSES': (
137+ 'rest_framework_json_api.parsers.JSONParser',
138+ 'rest_framework.parsers.FormParser',
139+ 'rest_framework.parsers.MultiPartParser'
140+ ),
141+ 'DEFAULT_RENDERER_CLASSES': (
142+ 'rest_framework_json_api.renderers.JSONRenderer',
143+ 'rest_framework.renderers.BrowsableAPIRenderer',
144+ ),
145+ 'DEFAULT_METADATA_CLASS': 'rest_framework_json_api.metadata.JSONAPIMetadata',
146+ }
153147
154148If ``PAGINATE_BY `` is set the renderer will return a ``meta `` object with
155149record count and a ``links `` object with the next and previous links. Pages
0 commit comments