mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
once more polished
This commit is contained in:
parent
8b999c6bb5
commit
d9c62c20a7
|
@ -23,7 +23,7 @@ class CreateModelMixin(object):
|
|||
return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)
|
||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
def get_success_headers(self,data):
|
||||
def get_success_headers(self, data):
|
||||
if 'url' in data:
|
||||
return {'Location': data.get('url')}
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user