summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2013-08-25 18:54:57 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2013-08-25 18:54:57 +0200
commitef44d89b1a256bf391158bb6b08bf9a793b84d8e (patch)
treedcf341e6eee2834ac3eab1c6198f146bac766389
parent5d53cf65e24253c9be82f04e646164511d51f81f (diff)
downloadIshtar-ef44d89b1a256bf391158bb6b08bf9a793b84d8e.tar.bz2
Ishtar-ef44d89b1a256bf391158bb6b08bf9a793b84d8e.zip
Fix messup between static and media files
-rw-r--r--archaeological_files/templates/ishtar/sheet_file_pdf.html2
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation_pdf.html2
-rw-r--r--example_project/local_settings.py.sample3
-rw-r--r--example_project/settings.py1
-rw-r--r--ishtar_common/templates/404.html4
-rw-r--r--ishtar_common/templates/base.html6
-rw-r--r--ishtar_common/templates/ishtar/sheet.html2
-rw-r--r--ishtar_common/templates/window.html6
-rw-r--r--ishtar_common/widgets.py6
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 %}
-<link rel="stylesheet" href="{{MEDIA_URL}}/media/style_basic.css" />
+<link rel="stylesheet" href="{{STATIC_URL}}/media/style_basic.css" />
{% 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 %}
-<link rel="stylesheet" href="{{MEDIA_URL}}/media/style_basic.css" />
+<link rel="stylesheet" href="{{STATIC_URL}}/media/style_basic.css" />
{% 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 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <link rel="shortcut icon" href="{{MEDIA_URL}}/media/images/favicon.png">
+ <link rel="shortcut icon" href="{{STATIC_URL}}/media/images/favicon.png">
<title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}
</title>
- <link rel="stylesheet" href="{{MEDIA_URL}}/media/style.css" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />
</head>
<body>
<div>
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 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <link rel="shortcut icon" href="{{MEDIA_URL}}/media/images/favicon.png"/>
+ <link rel="shortcut icon" href="{{STATIC_URL}}/media/images/favicon.png"/>
<title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}
</title>
<script language="javascript" type="text/javascript">
@@ -13,9 +13,9 @@
<script language="javascript" type="text/javascript" src="{{JQUERY_URL}}"></script>
<script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}jquery-ui.js"></script>
<script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}ui/i18n/jquery.ui.datepicker-{{COUNTRY}}.js"></script>
- <script language="javascript" type="text/javascript" src="{{MEDIA_URL}}/js/ishtar.js"></script>
+ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/ishtar.js"></script>
<link type="text/css" href="{{JQUERY_UI_URL}}css/smoothness/jquery-ui.css" rel="stylesheet" />
- <link rel="stylesheet" href="{{MEDIA_URL}}/media/style.css" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />
{% block extra_head %}
{% endblock %}
</head>
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 @@
<title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}
</title>
{% block css_head %}
- <link rel="stylesheet" href="{{MEDIA_URL}}/media/style.css" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />
{% endblock %}
</head>
<body>
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 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <link rel="shortcut icon" href="{{MEDIA_URL}}/media/images/favicon.png">
+ <link rel="shortcut icon" href="{{STATIC_URL}}/media/images/favicon.png">
<title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}
</title>
<script language="javascript" type="text/javascript">
@@ -13,9 +13,9 @@
<script language="javascript" type="text/javascript" src="{{JQUERY_URL}}"></script>
<script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}jquery-ui.js"></script>
<script language="javascript" type="text/javascript" src="{{JQUERY_UI_URL}}ui/i18n/jquery.ui.datepicker-{{COUNTRY}}.js"></script>
- <script language="javascript" type="text/javascript" src="{{MEDIA_URL}}/js/ishtar.js"></script>
+ <script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/ishtar.js"></script>
<link type="text/css" href="{{JQUERY_UI_URL}}css/smoothness/jquery-ui.css" rel="stylesheet" />
- <link rel="stylesheet" href="{{MEDIA_URL}}/media/style.css" />
+ <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />
{% block extra_head %}
{% endblock %}
</head>
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={},