From: Ɓukasz Rekucki Date: Tue, 11 May 2010 15:00:13 +0000 (+0200) Subject: Added STATIC_URL to all templates. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/9f57f525425707a7c9445c07f00371f17128f44c?hp=-c Added STATIC_URL to all templates. --- 9f57f525425707a7c9445c07f00371f17128f44c diff --git a/wolnelektury/context_processors.py b/wolnelektury/context_processors.py new file mode 100644 index 000000000..0cbf60513 --- /dev/null +++ b/wolnelektury/context_processors.py @@ -0,0 +1,6 @@ + +def extra_settings(request): + from django.conf import settings + return { + 'STATIC_URL': settings.STATIC_URL, + } diff --git a/wolnelektury/settings.py b/wolnelektury/settings.py index 62a2c9e23..afb84e86f 100644 --- a/wolnelektury/settings.py +++ b/wolnelektury/settings.py @@ -67,6 +67,7 @@ TEMPLATE_CONTEXT_PROCESSORS = [ 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.request', + 'context_processors.extra_settings', ] MIDDLEWARE_CLASSES = [ @@ -96,7 +97,7 @@ INSTALLED_APPS = [ 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.admindocs', - + # external 'south', 'sorl.thumbnail', @@ -131,7 +132,7 @@ COMPRESS_JS = { 'output_filename': 'js/jquery.min.js', }, 'all': { - 'source_filenames': ('js/jquery.autocomplete.js', 'js/jquery.form.js', + 'source_filenames': ('js/jquery.autocomplete.js', 'js/jquery.form.js', 'js/jquery.countdown.js', 'js/jquery.countdown-pl.js', 'js/jquery.jqmodal.js', 'js/jquery.labelify.js', 'js/catalogue.js', 'js/jquery.cookie.js',),