X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/ed6b9876b7abff0b2dc6266d6f769c319f358a9c..943e8bc4af0c11b0ace3811199e3b0844c4c3fbc:/philo/middleware.py diff --git a/philo/middleware.py b/philo/middleware.py index 5ec3e77..b90067a 100644 --- a/philo/middleware.py +++ b/philo/middleware.py @@ -1,6 +1,7 @@ from django.conf import settings from django.contrib.sites.models import Site from django.http import Http404 + from philo.models import Node, View @@ -43,7 +44,7 @@ class LazyNode(object): class RequestNodeMiddleware(object): - """Middleware to process the request's path and attach the closest ancestor node.""" + """Adds a ``node`` attribute, representing the currently-viewed node, to every incoming :class:`HttpRequest` object. This is required by :func:`philo.views.node_view`.""" def process_request(self, request): request.__class__.node = LazyNode()