1 from django.http import Http404, HttpResponse
2 from django.template import RequestContext
3 from django.contrib.sites.models import Site
4 from philo.models import Node
7 def node_view(request, path=None, **kwargs):
13 current_site = Site.objects.get_current()
15 node, subpath = Node.objects.get_with_path(path, root=current_site.root_node, absolute_result=False)
16 except Node.DoesNotExist:
20 if subpath and not node.accepts_subpath:
22 return node.render_to_response(request, path=path, subpath=subpath)