diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-02-28 16:58:07 +0000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-02-28 16:58:07 +0000 |
commit | 2ad289e3121a836a38acc61d59c355c873199247 (patch) | |
tree | 138904dbf076bdb3c410990a2ad1dfb2db875a73 | |
parent | b3f056964051a2edc0e92a2967410be7f812c784 (diff) | |
download | openembedded-core-contrib-2ad289e3121a836a38acc61d59c355c873199247.tar.gz |
Fix static pathing to use staticfiles
This is the recommended best practice.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r-- | base.html | 13 | ||||
-rw-r--r-- | layerindex/detail.html | 3 | ||||
-rw-r--r-- | layerindex/index.html | 3 | ||||
-rw-r--r-- | layerindex/urls.py | 1 |
4 files changed, 11 insertions, 9 deletions
@@ -9,15 +9,16 @@ {% load i18n %} +{% load staticfiles %} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> - <link rel="stylesheet" href="/static/css/bootstrap.css" /> - <link rel="stylesheet" href="/static/css/bootstrap-responsive.css" /> - <link rel="stylesheet" href="/static/css/additional.css" /> - <link rel="icon" type="image/vnd.microsoft.icon" href="/static/img/favicon.ico" /> + <link rel="stylesheet" href="{% static "css/bootstrap.css" %}" /> + <link rel="stylesheet" href="{% static "css/bootstrap-responsive.css" %}" /> + <link rel="stylesheet" href="{% static "css/additional.css" %}" /> + <link rel="icon" type="image/vnd.microsoft.icon" href="{% static "img/favicon.ico" %}" /> <title>{% block title %}OpenEmbedded metadata index{% endblock %}</title> </head> @@ -72,8 +73,8 @@ {% endblock %} </div> - <script src="/static/js/jquery-1.7.2.js"></script> - <script src="/static/js/bootstrap.js"></script> + <script src="{% static "js/jquery-1.7.2.js" %}"></script> + <script src="{% static "js/bootstrap.js" %}"></script> {% block scripts %} {% endblock %} diff --git a/layerindex/detail.html b/layerindex/detail.html index 67ed8ae5bc..102cda1981 100644 --- a/layerindex/detail.html +++ b/layerindex/detail.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n %} +{% load static %} {% comment %} @@ -237,7 +238,7 @@ {% block scripts %} - <script src="/static/js/uitablefilter.js" ></script> + <script src="{% static "js/uitablefilter.js" %}"></script> <script> // selectText plugin Borrowed from http://jsfiddle.net/edelman/KcX6A/1506/ diff --git a/layerindex/index.html b/layerindex/index.html index be334b40ed..d6b192ddad 100644 --- a/layerindex/index.html +++ b/layerindex/index.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n %} +{% load static %} {% comment %} @@ -111,7 +112,7 @@ {% block scripts %} -<script src="/static/js/uitablefilter.js"></script> +<script src="{% static "js/uitablefilter.js" %}"></script> <script> $(document).ready(function() { diff --git a/layerindex/urls.py b/layerindex/urls.py index dd57ddbba9..b0160097c4 100644 --- a/layerindex/urls.py +++ b/layerindex/urls.py @@ -56,5 +56,4 @@ urlpatterns = patterns('', template_name='layerindex/rawrecipes.txt'), name='recipe_list_raw'), url(r'^about$', 'layerindex.views.about', name="about"), - url(r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url': 'layerindex/static/img/favicon.ico'}), ) |