set default session age to 2 month, change session in init so it expires 2 months after the last init call. fixes #1056

This commit is contained in:
j 2012-10-02 10:36:43 +02:00
parent 0fe1786ec0
commit 5daba46fb4
2 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
import copy
from datetime import datetime
from django.shortcuts import render_to_response, redirect
from django.template import RequestContext
@ -159,6 +160,7 @@ def init(request):
response['data']['site'] = config
response['data']['user'] = init_user(request.user, request)
request.session['last_init'] = str(datetime.now())
return render_to_json_response(response)
actions.register(init)

View File

@ -190,6 +190,7 @@ USE_IMDB = False
VIDEO_PREFIX=''
#VIDEO_PREFIX='videoPART.example.com'
#SESSION_COOKIE_DOMAIN=*.example.com"
SESSION_COOKIE_AGE=60*24*60*60
SCRIPT_ROOT = normpath(join(PROJECT_ROOT, '..', 'scripts'))
#change script to customize