Ticket #8061: session-middleware.diff

File session-middleware.diff, 691 bytes (added by Joost Cassee, 16 years ago)
  • django/contrib/sessions/middleware.py

     
    1111        request.session = engine.SessionStore(session_key)
    1212
    1313    def process_response(self, request, response):
     14        # If the session cookie was not present, add the test cookie
     15        if settings.SESSION_COOKIE_NAME not in request.COOKIES:
     16            request.session.set_test_cookie()
     17
    1418        # If request.session was modified, or if response.session was set, save
    1519        # those changes and set a session cookie.
    1620        try:
Back to Top