X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/cec32849d48d9e36c030224e2eb9631d31ef17a2..81101c996edfb9d8aea2fd96b981e393d7198908:/philo/contrib/penfield/middleware.py?ds=inline diff --git a/philo/contrib/penfield/middleware.py b/philo/contrib/penfield/middleware.py index b25a28b..a0cd649 100644 --- a/philo/contrib/penfield/middleware.py +++ b/philo/contrib/penfield/middleware.py @@ -1,11 +1,11 @@ from django.http import HttpResponse from django.utils.decorators import decorator_from_middleware + from philo.contrib.penfield.exceptions import HttpNotAcceptable class HttpNotAcceptableMiddleware(object): - """Middleware to catch HttpNotAcceptable errors and return an Http406 response. - See RFC 2616.""" + """Middleware to catch :exc:`~philo.contrib.penfield.exceptions.HttpNotAcceptable` and return an :class:`HttpResponse` with a 406 response code. See :rfc:`2616`.""" def process_exception(self, request, exception): if isinstance(exception, HttpNotAcceptable): return HttpResponse(status=406)