diff options
| author | Sambhav Satija <sambhav13085@iiitd.ac.in> | 2015-08-12 06:23:26 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-08-12 10:39:07 -0400 |
| commit | d0bd5330432e1dda519ebd89606bd0980a36dcb4 (patch) | |
| tree | d40cb0e19bb24c43e5f4c67b47b171b45f240e29 /docs/ref | |
| parent | 290145e6616b32a0b0c63f44b7c09d0a4af7dfd5 (diff) | |
Fixed #25254 -- Added JsonResponse json_dumps_params parameter.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/request-response.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index 86cc4ccbd1..203db54eb0 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -912,7 +912,7 @@ types of HTTP responses. Like ``HttpResponse``, these subclasses live in JsonResponse objects ==================== -.. class:: JsonResponse(data, encoder=DjangoJSONEncoder, safe=True, **kwargs) +.. class:: JsonResponse(data, encoder=DjangoJSONEncoder, safe=True, json_dumps_params=None, **kwargs) An :class:`HttpResponse` subclass that helps to create a JSON-encoded response. It inherits most behavior from its superclass with a couple @@ -934,6 +934,13 @@ JsonResponse objects ``dict`` instances are allowed). If ``safe`` is ``True`` and a non-``dict`` object is passed as the first argument, a :exc:`TypeError` will be raised. + The ``json_dumps_params`` parameter is a dictionary of keyword arguments + to pass to the ``json.dumps()`` call used to generate the response. + + .. versionchanged:: 1.9 + + The ``json_dumps_params`` argument was added. + Usage ----- |
