diff options
| author | Tom Christie | 2012-09-03 15:57:43 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-09-03 15:57:43 +0100 |
| commit | 149b00a070fcbfd44feee5b37096081e18356f93 (patch) | |
| tree | 4ce2586f6a15613625a23d80b4624e64a9b94de6 /djangorestframework/views.py | |
| parent | 7abef9ac3b3fb20a6cdef5d52c640e5725c93437 (diff) | |
| download | django-rest-framework-149b00a070fcbfd44feee5b37096081e18356f93.tar.bz2 | |
Added the api_view decorator
Diffstat (limited to 'djangorestframework/views.py')
| -rw-r--r-- | djangorestframework/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/djangorestframework/views.py b/djangorestframework/views.py index fa34dc9a..3b76988c 100644 --- a/djangorestframework/views.py +++ b/djangorestframework/views.py @@ -146,8 +146,8 @@ class View(DjangoView): def http_method_not_allowed(self, request, *args, **kwargs): """ - Return an HTTP 405 error if an operation is called which does not have - a handler method. + Called if `request.method` does not corrospond to a handler method. + We raise an exception, which is handled by `.handle_exception()`. """ raise exceptions.MethodNotAllowed(request.method) |
