def process_response(self, request, response): """Closes the revision.""" if (hasattr(request, 'user') and request.user is not None and request.user.is_authenticated() and revision_context_manager.is_active()): revision_context_manager.set_user(request.user) if revision_context_manager.is_active(): revision_context_manager.set_comment( 'Request log from "RevisionMiddleware", path "%s"' % request.path) self._close_revision(request) return response
def process_response(self, request, response): """Closes the revision.""" if ( hasattr(request, "user") and request.user is not None and request.user.is_authenticated() and revision_context_manager.is_active() ): revision_context_manager.set_user(request.user) if revision_context_manager.is_active(): revision_context_manager.set_comment('Request log from "RevisionMiddleware", path "%s"' % request.path) self._close_revision(request) return response
def process_response(self, request, response): """Closes the revision.""" # look to see if the session has been accessed before looking for user to stop Vary: Cookie if hasattr(request, 'session') and request.session.accessed \ and hasattr(request, "user") and request.user.is_authenticated() \ and revision_context_manager.is_active(): revision_context_manager.set_user(request.user) self._close_revision(request) return response