mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 13:00:12 +03:00
Merge d8ee1389b8
into 0dffc46cb7
This commit is contained in:
commit
040ce6ebd5
|
@ -90,7 +90,9 @@ class JSONRenderer(BaseRenderer):
|
|||
|
||||
renderer_context = renderer_context or {}
|
||||
indent = self.get_indent(accepted_media_type, renderer_context)
|
||||
separators = SHORT_SEPARATORS if (indent is None and self.compact) else LONG_SEPARATORS
|
||||
separators = renderer_context.get(
|
||||
'separators',
|
||||
SHORT_SEPARATORS if (indent is None and self.compact) else LONG_SEPARATORS)
|
||||
|
||||
ret = json.dumps(
|
||||
data, cls=self.encoder_class,
|
||||
|
|
Loading…
Reference in New Issue
Block a user