1 from django.conf import settings
2 from django.http import Http404
3 from django.views.decorators.vary import vary_on_headers
4 from philo.exceptions import MIDDLEWARE_NOT_CONFIGURED
7 @vary_on_headers('Accept')
8 def node_view(request, path=None, **kwargs):
9 if "philo.middleware.RequestNodeMiddleware" not in settings.MIDDLEWARE_CLASSES:
10 raise MIDDLEWARE_NOT_CONFIGURED
16 subpath = request.node.subpath
18 if subpath and not node.accepts_subpath:
20 return node.render_to_response(request, kwargs)