Ticket #4119: middleware.py.3.diff
File middleware.py.3.diff, 938 bytes (added by , 18 years ago) |
---|
-
django/contrib/sessions/middleware.py
94 94 expires = None 95 95 else: 96 96 max_age = settings.SESSION_COOKIE_AGE 97 expires = datetime.datetime.strftime(datetime.datetime.utcnow() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE), "%a, %d-%b-%Y %H:%M:%S GMT")97 expires = (datetime.datetime.utcnow() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE)).ctime() 98 98 new_session = Session.objects.save(session_key, request.session._session, 99 99 datetime.datetime.now() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE)) 100 100 response.set_cookie(settings.SESSION_COOKIE_NAME, session_key,