Initial implementation of a separate syndication contrib app based on penfield's...
[philo.git] / philo / contrib / penfield / middleware.py
diff --git a/philo/contrib/penfield/middleware.py b/philo/contrib/penfield/middleware.py
deleted file mode 100644 (file)
index a0cd649..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-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 :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)
-
-
-http_not_acceptable = decorator_from_middleware(HttpNotAcceptableMiddleware)
\ No newline at end of file