Ticket #4119: middleware.py.diff

File middleware.py.diff, 1.0 KB (added by Jari Pennanen, 18 years ago)

Fix for django.contrib.sessions.middleware locale dependency

  • usr/src/python-modules/Django-svn/django/contrib/sessions/middleware.py

     
    9494                    expires = None
    9595                else:
    9696                    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.now() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE)).ctime()
    9898                new_session = Session.objects.save(session_key, request.session._session,
    9999                    datetime.datetime.now() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE))
    100100                response.set_cookie(settings.SESSION_COOKIE_NAME, session_key,
Back to Top