From ef44d89b1a256bf391158bb6b08bf9a793b84d8e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 25 Aug 2013 18:54:57 +0200 Subject: Fix messup between static and media files --- archaeological_files/templates/ishtar/sheet_file_pdf.html | 2 +- archaeological_operations/templates/ishtar/sheet_operation_pdf.html | 2 +- example_project/local_settings.py.sample | 3 ++- example_project/settings.py | 1 + ishtar_common/templates/404.html | 4 ++-- ishtar_common/templates/base.html | 6 +++--- ishtar_common/templates/ishtar/sheet.html | 2 +- ishtar_common/templates/window.html | 6 +++--- ishtar_common/widgets.py | 6 +++--- 9 files changed, 17 insertions(+), 15 deletions(-) diff --git a/archaeological_files/templates/ishtar/sheet_file_pdf.html b/archaeological_files/templates/ishtar/sheet_file_pdf.html index 29a4f4dec..f7535fb35 100644 --- a/archaeological_files/templates/ishtar/sheet_file_pdf.html +++ b/archaeological_files/templates/ishtar/sheet_file_pdf.html @@ -1,6 +1,6 @@ {% extends "ishtar/sheet_file.html" %} {% block css_head %} - + {% endblock %} {% block main_head %} {{ block.super }} diff --git a/archaeological_operations/templates/ishtar/sheet_operation_pdf.html b/archaeological_operations/templates/ishtar/sheet_operation_pdf.html index 9ef0edbf7..ec771459c 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation_pdf.html +++ b/archaeological_operations/templates/ishtar/sheet_operation_pdf.html @@ -1,6 +1,6 @@ {% extends "ishtar/sheet_operation.html" %} {% block css_head %} - + {% endblock %} {% block main_head %} {{ block.super }} diff --git a/example_project/local_settings.py.sample b/example_project/local_settings.py.sample index 763dcb938..901c7d3a8 100644 --- a/example_project/local_settings.py.sample +++ b/example_project/local_settings.py.sample @@ -24,7 +24,8 @@ DATABASES = { } ROOT_URLCONF = 'example_project.urls' -MEDIA_URL = 'http://mydomain/static/' +STATIC_URL = 'http://mydomain/static/' +MEDIA_URL = 'http://mydomain/media/' DEBUG = False DEBUG_TOOLBAR = False diff --git a/example_project/settings.py b/example_project/settings.py index 718c6c31b..983339ee5 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -83,6 +83,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_processors.media", + "django.core.context_processors.static", ) ROOT_URLCONF = 'example_project.urls' diff --git a/ishtar_common/templates/404.html b/ishtar_common/templates/404.html index 8ab3b07de..aec82ca88 100644 --- a/ishtar_common/templates/404.html +++ b/ishtar_common/templates/404.html @@ -4,10 +4,10 @@ - + {% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %} - +
diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index 007314892..e2aef1ca0 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -4,7 +4,7 @@ - + {% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %} - + - + {% block extra_head %} {% endblock %} diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html index 5608a684f..ff21f26e9 100644 --- a/ishtar_common/templates/ishtar/sheet.html +++ b/ishtar_common/templates/ishtar/sheet.html @@ -7,7 +7,7 @@ {% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %} {% block css_head %} - + {% endblock %} diff --git a/ishtar_common/templates/window.html b/ishtar_common/templates/window.html index a92f859ab..c473eff89 100644 --- a/ishtar_common/templates/window.html +++ b/ishtar_common/templates/window.html @@ -4,7 +4,7 @@ - + {% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %} - + - + {% block extra_head %} {% endblock %} diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 82c0c0ac0..b3e366e0d 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -185,11 +185,11 @@ class JQueryAutoComplete(forms.TextInput): class JQueryJqGrid(forms.RadioSelect): COL_TPL = "{name:'%(idx)s', index:'%(idx)s', sortable:true}" class Media: - js = ['%s/js/i18n/grid.locale-%s.js' % (settings.MEDIA_URL, + js = ['%s/js/i18n/grid.locale-%s.js' % (settings.STATIC_URL, settings.COUNTRY), - '%s/js/jquery.jqGrid.min.js' % settings.MEDIA_URL, + '%s/js/jquery.jqGrid.min.js' % settings.STATIC_URL, ] - css = {'all':['%s/media/ui.jqgrid.css' % settings.MEDIA_URL, + css = {'all':['%s/media/ui.jqgrid.css' % settings.STATIC_URL, ]} def __init__(self, source, form, associated_model, attrs={}, -- cgit v1.2.3