mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Merge branch 'version-3.0' of https://github.com/tomchristie/django-rest-framework into version-3.0
This commit is contained in:
commit
faa5bd9f53
|
@ -67,10 +67,10 @@ class UpdateModelMixin(object):
|
||||||
instance = self.get_object()
|
instance = self.get_object()
|
||||||
serializer = self.get_serializer(instance, data=request.data, partial=partial)
|
serializer = self.get_serializer(instance, data=request.data, partial=partial)
|
||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
self.preform_update(serializer)
|
self.perform_update(serializer)
|
||||||
return Response(serializer.data)
|
return Response(serializer.data)
|
||||||
|
|
||||||
def preform_update(self, serializer):
|
def perform_update(self, serializer):
|
||||||
serializer.save()
|
serializer.save()
|
||||||
|
|
||||||
def partial_update(self, request, *args, **kwargs):
|
def partial_update(self, request, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user