From 762dd6d726082cbf3172b33250ee95bf6387bd3c Mon Sep 17 00:00:00 2001 From: Adrien JOLY Date: Wed, 1 Mar 2023 15:49:34 +0100 Subject: [PATCH] Add drf_ujson --- README.rst | 2 ++ djangorestframework_camel_case/settings.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f2e36e1..73ebd3d 100644 --- a/README.rst +++ b/README.rst @@ -60,8 +60,10 @@ By default the package uses `rest_framework.renderers.JSONRenderer`. If you want to use another renderer, the two possible are: `drf_orjson_renderer.renderers.ORJSONRenderer` or +`drf_ujson.renderers.UJSONRenderer` or `rest_framework.renderers.UnicodeJSONRenderer` for DRF < 3.0,specify it in your django settings file. +settings file. .. code-block:: python diff --git a/djangorestframework_camel_case/settings.py b/djangorestframework_camel_case/settings.py index 6db7ac9..fb3ac12 100644 --- a/djangorestframework_camel_case/settings.py +++ b/djangorestframework_camel_case/settings.py @@ -17,7 +17,8 @@ VALID_SETTINGS = { "RENDERER_CLASS": ( "rest_framework.renderers.JSONRenderer", - "drf_orjson_renderer.renderers.ORJSONRenderer", + "drf_orjson_renderer.renderers.ORJSONRenderer", + "drf_ujson.renderers.UJSONRenderer", "rest_framework.renderers.UnicodeJSONRenderer", ), "PARSER_CLASS": ("rest_framework.parsers.JSONParser",),