1 from django.http import Http404
2 from django.views.decorators.vary import vary_on_headers
3 from philo.exceptions import MIDDLEWARE_NOT_CONFIGURED
6 @vary_on_headers('Accept')
7 def node_view(request, path=None, **kwargs):
8 if not hasattr(request, 'node'):
9 raise MIDDLEWARE_NOT_CONFIGURED
15 subpath = request.node.subpath
17 if subpath and not node.accepts_subpath:
19 return node.render_to_response(request, kwargs)