X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/bd4e85c2780dc58b34a16b4f2137723e68ba5a07..a9bcac16553e058df0d6da55692c8935388e5b5c:/views.py?ds=sidebyside diff --git a/views.py b/views.py index 41718e5..255e54e 100644 --- a/views.py +++ b/views.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.http import Http404 from django.views.decorators.vary import vary_on_headers from philo.exceptions import MIDDLEWARE_NOT_CONFIGURED @@ -5,7 +6,7 @@ from philo.exceptions import MIDDLEWARE_NOT_CONFIGURED @vary_on_headers('Accept') def node_view(request, path=None, **kwargs): - if not hasattr(request, 'node'): + if "philo.middleware.RequestNodeMiddleware" not in settings.MIDDLEWARE_CLASSES: raise MIDDLEWARE_NOT_CONFIGURED if not request.node: