def update(self, request, addon_id): addon = self.get_object_or_none() if addon is None: return Response(status=410) form = AddonForm(request.DATA, instance=addon) if not form.is_valid(): return _form_error(form) serializer = self.serializer_class(form.save()) return Response(serializer.data)
def update(self, request, addon): form = AddonForm(request.PUT, instance=addon) if not form.is_valid(): return _form_error(form) a = form.save() return a