Fix static pathing to use staticfiles

This is the recommended best practice.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2013-02-28 16:58:07 +00:00
parent b3f0569640
commit 2ad289e312
4 changed files with 11 additions and 9 deletions

View File

@ -9,15 +9,16 @@
{% load i18n %} {% load i18n %}
{% load staticfiles %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<link rel="stylesheet" href="/static/css/bootstrap.css" /> <link rel="stylesheet" href="{% static "css/bootstrap.css" %}" />
<link rel="stylesheet" href="/static/css/bootstrap-responsive.css" /> <link rel="stylesheet" href="{% static "css/bootstrap-responsive.css" %}" />
<link rel="stylesheet" href="/static/css/additional.css" /> <link rel="stylesheet" href="{% static "css/additional.css" %}" />
<link rel="icon" type="image/vnd.microsoft.icon" href="/static/img/favicon.ico" /> <link rel="icon" type="image/vnd.microsoft.icon" href="{% static "img/favicon.ico" %}" />
<title>{% block title %}OpenEmbedded metadata index{% endblock %}</title> <title>{% block title %}OpenEmbedded metadata index{% endblock %}</title>
</head> </head>
@ -72,8 +73,8 @@
{% endblock %} {% endblock %}
</div> </div>
<script src="/static/js/jquery-1.7.2.js"></script> <script src="{% static "js/jquery-1.7.2.js" %}"></script>
<script src="/static/js/bootstrap.js"></script> <script src="{% static "js/bootstrap.js" %}"></script>
{% block scripts %} {% block scripts %}
{% endblock %} {% endblock %}

View File

@ -1,5 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %}
{% comment %} {% comment %}
@ -237,7 +238,7 @@
{% block scripts %} {% block scripts %}
<script src="/static/js/uitablefilter.js" ></script> <script src="{% static "js/uitablefilter.js" %}"></script>
<script> <script>
// selectText plugin Borrowed from http://jsfiddle.net/edelman/KcX6A/1506/ // selectText plugin Borrowed from http://jsfiddle.net/edelman/KcX6A/1506/

View File

@ -1,5 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %} {% load i18n %}
{% load static %}
{% comment %} {% comment %}
@ -111,7 +112,7 @@
{% block scripts %} {% block scripts %}
<script src="/static/js/uitablefilter.js"></script> <script src="{% static "js/uitablefilter.js" %}"></script>
<script> <script>
$(document).ready(function() { $(document).ready(function() {

View File

@ -56,5 +56,4 @@ urlpatterns = patterns('',
template_name='layerindex/rawrecipes.txt'), template_name='layerindex/rawrecipes.txt'),
name='recipe_list_raw'), name='recipe_list_raw'),
url(r'^about$', 'layerindex.views.about', name="about"), url(r'^about$', 'layerindex.views.about', name="about"),
url(r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url': 'layerindex/static/img/favicon.ico'}),
) )