mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 13:00:12 +03:00
Merge c725a0461d
into 56f0138bb9
This commit is contained in:
commit
1e6b0e4eaf
|
@ -277,7 +277,7 @@ We'll also need a view which corresponds to an individual snippet, and can be us
|
|||
serializer = SnippetSerializer(snippet, data=data)
|
||||
if serializer.is_valid():
|
||||
serializer.save()
|
||||
return JSONResponse(serializer.data)
|
||||
return JSONResponse(serializer.data, status=201)
|
||||
return JSONResponse(serializer.errors, status=400)
|
||||
|
||||
elif request.method == 'DELETE':
|
||||
|
|
Loading…
Reference in New Issue
Block a user