# HG changeset patch # User Madhusudan.C.S # Date 1254472308 -19800 # Node ID 243a7e90f3c3867a7c27e99194146fda9a7ab20e # Parent 2b21f6434ce214d2c32d9408310d108010c99f90 Added Template context processors and Session Expire time for auth module. diff -r 2b21f6434ce2 -r 243a7e90f3c3 conference/views.py --- a/conference/views.py Fri Oct 02 14:01:09 2009 +0530 +++ b/conference/views.py Fri Oct 02 14:01:48 2009 +0530 @@ -32,8 +32,8 @@ ") %{'username': username,'url': url} return msg -def home_page(request, template_name='index.html'): - return render_to_response(template_name) +def home(request, template_name='home.html'): + return render_to_response(template_name, RequestContext(request, {})) def logout(request): print request.user.username diff -r 2b21f6434ce2 -r 243a7e90f3c3 settings.py --- a/settings.py Fri Oct 02 14:01:09 2009 +0530 +++ b/settings.py Fri Oct 02 14:01:48 2009 +0530 @@ -12,6 +12,10 @@ MANAGERS = ADMINS +SESSION_EXPIRE_AT_BROWSER_CLOSE = True + +DEFAULT_FROM_EMAIL = 'admin@scipy.in' + DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = 'conference' # Or path to database file if using sqlite3. DATABASE_USER = 'root' # Not used with sqlite3. @@ -57,6 +61,14 @@ AUTH_PROFILE_MODULE = 'conference.participant' +# List of context processors. +TEMPLATE_CONTEXT_PROCESSORS = ( + 'django.core.context_processors.auth', + 'django.core.context_processors.debug', + 'django.core.context_processors.i18n', + 'django.core.context_processors.media' +) + # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', diff -r 2b21f6434ce2 -r 243a7e90f3c3 template/index.html --- a/template/index.html Fri Oct 02 14:01:09 2009 +0530 +++ b/template/index.html Fri Oct 02 14:01:48 2009 +0530 @@ -47,12 +47,12 @@