From 9f57f525425707a7c9445c07f00371f17128f44c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Rekucki?= Date: Tue, 11 May 2010 17:00:13 +0200 Subject: [PATCH 1/1] Added STATIC_URL to all templates. --- wolnelektury/context_processors.py | 6 ++++++ wolnelektury/settings.py | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 wolnelektury/context_processors.py 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',), -- 2.20.1