Add a template context processor that sets link_root on all secure requests,

so that we can generate proper linkbacks to the non-secure version of the
site for all static content.
This commit is contained in:
Magnus Hagander
2009-09-16 16:08:17 +02:00
parent 4be5cd0266
commit df91488ae6
3 changed files with 31 additions and 12 deletions

View File

@ -70,6 +70,12 @@ TEMPLATE_DIRS = (
'../templates/',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.auth',
'django.core.context_processors.media',
'util.contexts.RootLinkContextProcessor',
)
LOGIN_URL='/account/login/'
LOGIN_REDIRECT_URL='/account/'
LOGOUT_URL='/account/logout/'
@ -95,6 +101,8 @@ INSTALLED_APPS = [
]
SITE_ROOT="http://www.postgresql.org"
# Load local settings overrides
from settings_local import *