Replace template variables static_{third,public} with hardcoded paths

So that the 500 error view will render properly, even though no variables are
set.  We keep the variable static_hidden, which by design is not used on the
500 page.

Fixes #240.

(imported from commit 3c7534f896479b7d7edbe5ef13958481e169a13c)
This commit is contained in:
Keegan McAllister
2012-10-31 14:00:40 -04:00
parent f0fd80a294
commit b81ef9cca7
4 changed files with 14 additions and 16 deletions

View File

@@ -10,13 +10,13 @@
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![endif]-->
<link href="{{ static_third }}bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="/static/third/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="{{ static_third }}bootstrap/css/bootstrap-responsive.css" rel="stylesheet"> <link href="/static/third/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
{# We need to import jQuery before Bootstrap #} {# We need to import jQuery before Bootstrap #}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="{{ static_third }}bootstrap/js/bootstrap.min.js"></script> <script src="/static/third/bootstrap/js/bootstrap.min.js"></script>
<script src="{{ static_public }}js/common.js"></script> <script src="/static/public/js/common.js"></script>
{% block customhead %} {% block customhead %}
{% endblock %} {% endblock %}
</head> </head>

View File

@@ -28,15 +28,15 @@
<link href="{{ static_hidden }}styles/zephyr.css?dummy_time={% now "U" %}" rel="stylesheet"> <link href="{{ static_hidden }}styles/zephyr.css?dummy_time={% now "U" %}" rel="stylesheet">
<link href="{{ static_hidden }}styles/pygments.css" rel="stylesheet"> <link href="{{ static_hidden }}styles/pygments.css" rel="stylesheet">
<script type="text/javascript" src="{{ static_third }}jquery/jquery.form.js"></script> <script type="text/javascript" src="/static/third/jquery/jquery.form.js"></script>
<script type="text/javascript" src="{{ static_third }}jquery/jquery.highlight.js"></script> <script type="text/javascript" src="/static/third/jquery/jquery.highlight.js"></script>
<script type="text/javascript" src="{{ static_third }}xdate/xdate.js"></script> <script type="text/javascript" src="/static/third/xdate/xdate.js"></script>
<script type="text/javascript" src="{{ static_third }}handlebars/handlebars-1.0.rc.1.js"></script> <script type="text/javascript" src="/static/third/handlebars/handlebars-1.0.rc.1.js"></script>
<script type="text/javascript" src="{{ static_third }}spin/spin.min.js"></script> <script type="text/javascript" src="/static/third/spin/spin.min.js"></script>
<script type="text/javascript" src="{{ static_third }}jquery-mousewheel/jquery.mousewheel.js"></script> <script type="text/javascript" src="/static/third/jquery-mousewheel/jquery.mousewheel.js"></script>
<script type="text/javascript" src="{{ static_third }}jquery-throttle-debounce/jquery.ba-throttle-debounce.min.js"></script> <script type="text/javascript" src="/static/third/jquery-throttle-debounce/jquery.ba-throttle-debounce.min.js"></script>
<script type="text/javascript" src="{{ static_third }}jquery.idle/jquery.idle.js"></script> <script type="text/javascript" src="/static/third/jquery.idle/jquery.idle.js"></script>
<script type="text/javascript" src="{{ static_third }}jquery-autosize/jquery.autosize.js"></script> <script type="text/javascript" src="/static/third/jquery-autosize/jquery.autosize.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/setup.js"></script> <script type="text/javascript" src="{{ static_hidden }}js/setup.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/rows.js"></script> <script type="text/javascript" src="{{ static_hidden }}js/rows.js"></script>
<script type="text/javascript" src="{{ static_hidden }}js/narrow.js"></script> <script type="text/javascript" src="{{ static_hidden }}js/narrow.js"></script>

View File

@@ -8,7 +8,7 @@ hence the name.
{% endcomment %} {% endcomment %}
{% block customhead %} {% block customhead %}
<link href="{{ static_public }}styles/portico.css?dummy_time={% now "U" %}" rel="stylesheet"> <link href="/static/public/styles/portico.css?dummy_time={% now "U" %}" rel="stylesheet">
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@@ -5,7 +5,5 @@ def add_settings(context):
'full_navbar': settings.FULL_NAVBAR, 'full_navbar': settings.FULL_NAVBAR,
# c.f. Django's STATIC_URL variable # c.f. Django's STATIC_URL variable
'static_public': '/static/public/',
'static_third': '/static/third/',
'static_hidden': '/static/4nrjx8cwce2bka8r/', 'static_hidden': '/static/4nrjx8cwce2bka8r/',
} }