--- /dev/null
+# -*- coding: utf-8
+__author__="lreqc"
+__date__ ="$2009-09-03 08:34:10$"
+
+def settings(request):
+ from django.conf import settings
+ return {'MEDIA_URL': settings.MEDIA_URL, 'STATIC_URL': settings.STATIC_URL}
+
+
"django.core.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
- "django.core.context_processors.media",
+ "explorer.context_processors.settings",
"django.core.context_processors.request",
)
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>{% block title %}Platforma Redakcyjna{% block subtitle %}{% endblock subtitle %}{% endblock title%}</title>
- <link rel="stylesheet" href="/static/css/master.css" type="text/css" />
- <script src="/static/js/jquery.js" type="text/javascript" charset="utf-8"></script>
- <script src="/static/js/jquery.logging.js" type="text/javascript" charset="utf-8"></script>
+ <link rel="stylesheet" href="{{ STATIC_URL }}css/master.css" type="text/css" />
+ <script src="{{ STATIC_URL }}js/jquery.js" type="text/javascript" charset="utf-8"></script>
+ <script src="{{ STATIC_URL }}js/jquery.logging.js" type="text/javascript" charset="utf-8"></script>
{% block extrahead %}
{% endblock %}
</head>
{% extends "base.html" %}
{% block extrahead %}
- <link rel="stylesheet" href="/static/css/toolbar.css" type="text/css" />
- <script src="/static/js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
- <script src="/static/js/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
- <script src="/static/js/jquery.autoscroll.js" type="text/javascript" charset="utf-8"></script>
- <script src="/static/js/jquery.wtooltip.js" type="text/javascript" charset="utf-8"></script>
- <script src="/static/js/jquery.hpanel.js" type="text/javascript" charset="utf-8"></script>
- <script src="/static/js/jquery.json.js" type="text/javascript" charset="utf-8"></script>
- <script src="/static/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
- <script src="/static/js/editor.js" type="text/javascript" charset="utf-8"></script>
+ <link rel="stylesheet" href="{{STATIC_URL}}css/toolbar.css" type="text/css" />
+ <script src="{{STATIC_URL}}js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
+ <script src="{{STATIC_URL}}js/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
+ <script src="{{STATIC_URL}}js/jquery.autoscroll.js" type="text/javascript" charset="utf-8"></script>
+ <script src="{{STATIC_URL}}js/jquery.wtooltip.js" type="text/javascript" charset="utf-8"></script>
+ <script src="{{STATIC_URL}}js/jquery.hpanel.js" type="text/javascript" charset="utf-8"></script>
+ <script src="{{STATIC_URL}}js/jquery.json.js" type="text/javascript" charset="utf-8"></script>
+ <script src="{{STATIC_URL}}js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
+ <script src="{{STATIC_URL}}js/editor.js" type="text/javascript" charset="utf-8"></script>
{% endblock extrahead %}
{% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> ❯ plik {{ hash }}{% endblock breadcrumbs %}
var texteditor = CodeMirror.fromTextArea(textareaId, {
parserfile: 'parsexml.js',
- path: "/static/js/codemirror/",
- stylesheet: "/static/css/xmlcolors.css",
+ path: "{{STATIC_URL}}js/codemirror/",
+ stylesheet: "{{STATIC_URL}}css/xmlcolors.css",
parserConfig: {useHTMLKludges: false},
onChange: function() {
panel.trigger('panel:contentChanged', self);
opacity: 0.9,
background: "#FBFBC6",
padding: "1px",
- fontSize: "12px",
+ fontSize: "12px"
}
});
# Static files
-if settings.DEBUG:
+if settings.DEBUG and not hasattr(settings, 'DONT_SERVE_STATIC'):
urlpatterns += patterns('',
- url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
+ url(r'^%s(?P<path>.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
url(r'^%s(?P<path>.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT, 'show_indexes': True}),