From 149b00a070fcbfd44feee5b37096081e18356f93 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 3 Sep 2012 15:57:43 +0100 Subject: Added the api_view decorator --- djangorestframework/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'djangorestframework/views.py') 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) -- cgit v1.2.3