aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/mixins.py
diff options
context:
space:
mode:
authorTom Christie2012-12-19 22:05:35 +0000
committerTom Christie2012-12-19 22:05:35 +0000
commit598ae3286ac6343a59e6d80fc93428539c5f836e (patch)
tree364365bd2b1ada25c196c1c45717dd2c48db3931 /rest_framework/mixins.py
parentd90d5380d730b992b1b59aaf9d1f89fbbbba0f9f (diff)
downloaddjango-rest-framework-598ae3286ac6343a59e6d80fc93428539c5f836e.tar.bz2
Fix #521. (Browseable API exception on delete)
Diffstat (limited to 'rest_framework/mixins.py')
-rw-r--r--rest_framework/mixins.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/mixins.py b/rest_framework/mixins.py
index 8dc0c329..2700606d 100644
--- a/rest_framework/mixins.py
+++ b/rest_framework/mixins.py
@@ -124,6 +124,6 @@ class DestroyModelMixin(object):
Should be mixed in with `SingleObjectBaseView`.
"""
def destroy(self, request, *args, **kwargs):
- self.object = self.get_object()
- self.object.delete()
+ obj = self.get_object()
+ obj.delete()
return Response(status=status.HTTP_204_NO_CONTENT)