Loading django/views/decorators/http.py +3 −3 Original line number Diff line number Diff line Loading @@ -47,13 +47,13 @@ def require_http_methods(request_method_list): return decorator require_GET = require_http_methods(["GET"]) require_GET.__doc__ = "Decorator to require that a view only accept the GET method." require_GET.__doc__ = "Decorator to require that a view only accepts the GET method." require_POST = require_http_methods(["POST"]) require_POST.__doc__ = "Decorator to require that a view only accept the POST method." require_POST.__doc__ = "Decorator to require that a view only accepts the POST method." require_safe = require_http_methods(["GET", "HEAD"]) require_safe.__doc__ = "Decorator to require that a view only accept safe methods: GET and HEAD." require_safe.__doc__ = "Decorator to require that a view only accepts safe methods: GET and HEAD." def _precondition_failed(request): Loading docs/topics/http/decorators.txt +4 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ a :class:`django.http.HttpResponseNotAllowed` if the conditions are not met. .. function:: require_http_methods(request_method_list) Decorator to require that a view only accept particular request Decorator to require that a view only accepts particular request methods. Usage:: from django.views.decorators.http import require_http_methods Loading @@ -31,15 +31,15 @@ a :class:`django.http.HttpResponseNotAllowed` if the conditions are not met. .. function:: require_GET() Decorator to require that a view only accept the GET method. Decorator to require that a view only accepts the GET method. .. function:: require_POST() Decorator to require that a view only accept the POST method. Decorator to require that a view only accepts the POST method. .. function:: require_safe() Decorator to require that a view only accept the GET and HEAD methods. Decorator to require that a view only accepts the GET and HEAD methods. These methods are commonly considered "safe" because they should not have the significance of taking an action other than retrieving the requested resource. Loading Loading
django/views/decorators/http.py +3 −3 Original line number Diff line number Diff line Loading @@ -47,13 +47,13 @@ def require_http_methods(request_method_list): return decorator require_GET = require_http_methods(["GET"]) require_GET.__doc__ = "Decorator to require that a view only accept the GET method." require_GET.__doc__ = "Decorator to require that a view only accepts the GET method." require_POST = require_http_methods(["POST"]) require_POST.__doc__ = "Decorator to require that a view only accept the POST method." require_POST.__doc__ = "Decorator to require that a view only accepts the POST method." require_safe = require_http_methods(["GET", "HEAD"]) require_safe.__doc__ = "Decorator to require that a view only accept safe methods: GET and HEAD." require_safe.__doc__ = "Decorator to require that a view only accepts safe methods: GET and HEAD." def _precondition_failed(request): Loading
docs/topics/http/decorators.txt +4 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ a :class:`django.http.HttpResponseNotAllowed` if the conditions are not met. .. function:: require_http_methods(request_method_list) Decorator to require that a view only accept particular request Decorator to require that a view only accepts particular request methods. Usage:: from django.views.decorators.http import require_http_methods Loading @@ -31,15 +31,15 @@ a :class:`django.http.HttpResponseNotAllowed` if the conditions are not met. .. function:: require_GET() Decorator to require that a view only accept the GET method. Decorator to require that a view only accepts the GET method. .. function:: require_POST() Decorator to require that a view only accept the POST method. Decorator to require that a view only accepts the POST method. .. function:: require_safe() Decorator to require that a view only accept the GET and HEAD methods. Decorator to require that a view only accepts the GET and HEAD methods. These methods are commonly considered "safe" because they should not have the significance of taking an action other than retrieving the requested resource. Loading