mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 11:33:59 +03:00
updated to buildin status codes
This commit is contained in:
parent
44ff2e0add
commit
728e505180
|
@ -19,7 +19,7 @@ from rest_framework.request import clone_request
|
||||||
from rest_framework.utils import dict2xml
|
from rest_framework.utils import dict2xml
|
||||||
from rest_framework.utils import encoders
|
from rest_framework.utils import encoders
|
||||||
from rest_framework.utils.breadcrumbs import get_breadcrumbs
|
from rest_framework.utils.breadcrumbs import get_breadcrumbs
|
||||||
from rest_framework import VERSION
|
from rest_framework import VERSION, status
|
||||||
from rest_framework import serializers, parsers
|
from rest_framework import serializers, parsers
|
||||||
|
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ class BrowsableAPIRenderer(BaseRenderer):
|
||||||
# Munge DELETE Response code to allow us to return content
|
# Munge DELETE Response code to allow us to return content
|
||||||
# (Do this *after* we've rendered the template so that we include
|
# (Do this *after* we've rendered the template so that we include
|
||||||
# the normal deletion response code in the output)
|
# the normal deletion response code in the output)
|
||||||
if response.status_code == 204:
|
if response.status_code == status.HTTP_204_NO_CONTENT:
|
||||||
response.status_code = 200
|
response.status_code = status.HTTP_200_OK
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue
Block a user