diff options
| author | Tom Christie | 2012-08-26 22:13:26 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-08-26 22:13:26 +0100 |
| commit | 474780f9d6cdb593f82130d39b6a6ff7ef8b78e0 (patch) | |
| tree | a945404f8ff218ef882505b5460b8a01b01bfc8c /djangorestframework/views.py | |
| parent | 3928802178c8361d6d24364a5d0b866d6907c084 (diff) | |
| download | django-rest-framework-474780f9d6cdb593f82130d39b6a6ff7ef8b78e0.tar.bz2 | |
Remove 405 method not allowed ImmediateResponse
Diffstat (limited to 'djangorestframework/views.py')
| -rw-r--r-- | djangorestframework/views.py | 5 |
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): |
