app/soc/middleware/value_store.py
changeset 2910 60d56cf01b54
parent 2906 6fb53ed7aff4
equal deleted inserted replaced
2909:81eaf0a9101f 2910:60d56cf01b54
    37     """
    37     """
    38 
    38 
    39     core = callback.getCore()
    39     core = callback.getCore()
    40     core.startNewRequest(request)
    40     core.startNewRequest(request)
    41 
    41 
    42   def end(self, request):
    42   def end(self, request, optional):
    43     """Empties the value store.
    43     """Empties the value store.
    44 
    44 
    45     Args:
    45     Args:
    46       request: a Django HttpRequest object
    46       request: a Django HttpRequest object
    47     """
    47     """
    48 
    48 
    49     core = callback.getCore()
    49     core = callback.getCore()
    50     core.endRequest(request)
    50     core.endRequest(request, optional)
    51 
    51 
    52   def process_request(self, request):
    52   def process_request(self, request):
    53     """Called when a request is made.
    53     """Called when a request is made.
    54 
    54 
    55     See the Django middleware documentation for an explanation of
    55     See the Django middleware documentation for an explanation of
    62 
    62 
    63     See the Django middleware documentation for an explanation of
    63     See the Django middleware documentation for an explanation of
    64     the method signature.
    64     the method signature.
    65     """
    65     """
    66 
    66 
    67     self.end(request)
    67     self.end(request, True)
    68     return response
    68     return response
    69 
    69 
    70   def process_exception(self, request, exception):
    70   def process_exception(self, request, exception):
    71     """Called when an uncaught exception is raised.
    71     """Called when an uncaught exception is raised.
    72 
    72 
    73     See the Django middleware documentation for an explanation of
    73     See the Django middleware documentation for an explanation of
    74     the method signature.
    74     the method signature.
    75     """
    75     """
    76 
    76 
    77     self.end(request)
    77     self.end(request, False)