aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/views.py
diff options
context:
space:
mode:
authorTom Christie2012-08-26 22:13:26 +0100
committerTom Christie2012-08-26 22:13:26 +0100
commit474780f9d6cdb593f82130d39b6a6ff7ef8b78e0 (patch)
treea945404f8ff218ef882505b5460b8a01b01bfc8c /djangorestframework/views.py
parent3928802178c8361d6d24364a5d0b866d6907c084 (diff)
downloaddjango-rest-framework-474780f9d6cdb593f82130d39b6a6ff7ef8b78e0.tar.bz2
Remove 405 method not allowed ImmediateResponse
Diffstat (limited to 'djangorestframework/views.py')
-rw-r--r--djangorestframework/views.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/djangorestframework/views.py b/djangorestframework/views.py
index b0e23534..36d05721 100644
--- a/djangorestframework/views.py
+++ b/djangorestframework/views.py
@@ -147,10 +147,7 @@ class View(DjangoView):
Return an HTTP 405 error if an operation is called which does not have
a handler method.
"""
- content = {
- 'detail': "Method '%s' not allowed." % request.method
- }
- raise ImmediateResponse(content, status.HTTP_405_METHOD_NOT_ALLOWED)
+ raise exceptions.MethodNotAllowed(request.method)
@property
def _parsed_media_types(self):