app/soc/middleware/maintenance.py
changeset 2906 6fb53ed7aff4
parent 2905 378833eb5a95
--- a/app/soc/middleware/maintenance.py	Sat Sep 12 14:38:42 2009 +0200
+++ b/app/soc/middleware/maintenance.py	Sat Sep 12 14:42:37 2009 +0200
@@ -64,12 +64,24 @@
     return responses.respond(request, template, context=context)
 
   def process_request(self, request):
+    """Called when a request is made.
+
+    See the Django middleware documentation for an explanation of
+    the method signature.
+    """
+
     context = responses.getUniversalContext(request)
 
     if not context['is_admin'] and context['in_maintenance']:
       return self.maintenance(request)
 
   def process_exception(self, request, exception):
+    """Called when an uncaught exception is raised.
+
+    See the Django middleware documentation for an explanation of
+    the method signature.
+    """
+
     if isinstance(exception, CapabilityDisabledError):
       # assume the site is in maintenance if we get CDE
       return maintenance(request)