diff options
author | Stephen Finucane <stephenfinucane@hotmail.com> | 2015-04-07 22:20:53 +0100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2015-05-03 13:46:52 +0800 |
commit | d4a2c1f8792f52fec0c881ab38c91635840a50c0 (patch) | |
tree | f08cb31b6c2ad4a80bacbf9ba8a2b8b2b2cdca6d /templates | |
parent | c641660e041fdf932bad89681c167328ee85249a (diff) | |
download | patchwork-d4a2c1f8792f52fec0c881ab38c91635840a50c0.tar patchwork-d4a2c1f8792f52fec0c881ab38c91635840a50c0.tar.gz |
Integrate 'django.contrib.staticfiles'
Rather than providing a custom solution for serving static files, use
the solution provided in the upstream Django source.
This allows us to remove the top-level 'urls.py' file.
Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 9 | ||||
-rw-r--r-- | templates/patchwork/bundle.html | 13 | ||||
-rw-r--r-- | templates/patchwork/bundles.html | 6 | ||||
-rw-r--r-- | templates/patchwork/filters.html | 5 | ||||
-rw-r--r-- | templates/patchwork/list.html | 1 | ||||
-rw-r--r-- | templates/patchwork/patch-list.html | 31 |
6 files changed, 43 insertions, 22 deletions
diff --git a/templates/base.html b/templates/base.html index f04d6e1..3d289fb 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,12 +1,13 @@ -{% load pwurl %}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" +{% load staticfiles %} +{% load pwurl %} +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>{% block title %}Patchwork{% endblock %} - Patchwork</title> - <link rel="stylesheet" type="text/css" href="/css/style.css"/> - <script language="JavaScript" type="text/javascript" src="/js/common.js"> - </script> + <link rel="stylesheet" type="text/css" href="{% static "css/style.css" %}"/> + <script type="text/javascript" src="{% static "js/common.js" %}"></script> {% block headers %}{% endblock %} </head> <body> diff --git a/templates/patchwork/bundle.html b/templates/patchwork/bundle.html index d47cf13..4a96b6b 100644 --- a/templates/patchwork/bundle.html +++ b/templates/patchwork/bundle.html @@ -1,17 +1,12 @@ {% extends "base.html" %} {% load person %} +{% load static %} {% block headers %} - <script language="JavaScript" type="text/javascript" - src="/js/jquery-1.10.1.min.js"> - </script> - <script language="JavaScript" type="text/javascript" - src="/js/jquery.tablednd.js"> - </script> - <script language="JavaScript" type="text/javascript" - src="/js/bundle.js"> - </script> + <script type="text/javascript" src="{% static "js/jquery-1.10.1.min.js" %}"></script> + <script type="text/javascript" src="{% static "js/jquery.tablednd.js" %}"></script> + <script type="text/javascript" src="{% static "js/bundle.js" %}"></script> {% endblock %} {% block title %}{{project.name}}{% endblock %} {% block heading %}bundle: {{bundle.owner.username}} / diff --git a/templates/patchwork/bundles.html b/templates/patchwork/bundles.html index a725d95..11fb89d 100644 --- a/templates/patchwork/bundles.html +++ b/templates/patchwork/bundles.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% load static %} + {% block title %}Bundles{% endblock %} {% block heading %}Bundles{% endblock %} @@ -27,7 +29,7 @@ <td style="text-align: right">{{ bundle.n_patches }}</td> <td style="text-align: center;"><a href="{% url 'patchwork.views.bundle.mbox' username=bundle.owner.username bundlename=bundle.name %}" - ><img src="/images/16-em-down.png" width="16" height="16" alt="download" + ><img src="{% static "images/16-em-down.png" %}" width="16" height="16" alt="download" title="download"/></a></td> <td style="text-align: center;"> <form method="post" @@ -35,7 +37,7 @@ {% csrf_token %} {{ bundle.delete_form.as_p }} <input type="image" - src="/images/16-em-cross.png" width="16" height="16" alt="delete" + src="{% static "images/patchwork/16-em-cross.png" %}" width="16" height="16" alt="delete" title="delete" border="0" style="border: none;"/> </form> </td> diff --git a/templates/patchwork/filters.html b/templates/patchwork/filters.html index e2b7585..10ca587 100644 --- a/templates/patchwork/filters.html +++ b/templates/patchwork/filters.html @@ -1,3 +1,4 @@ +{% load static %} <script type="text/javascript" language="JavaScript"> var filterform_displayed = false; @@ -150,7 +151,7 @@ function submitter_field_change(field) {% if not filter.forced %} <a href="{{ filter.url_without_me }}"><img width="16" height="16" alt="remove filter" title="remove filter" - src="/images/16-circle-blue-remove.png"></a> + src="{% static "images/16-circle-blue-remove.png" %}"></a> {% endif %} {% if not forloop.last %} | {% endif %} {% endfor %} @@ -158,7 +159,7 @@ function submitter_field_change(field) none <a href="javascript:filter_click()"><img width="16" height="16" alt="add filter" title="add filter" - src="/images/16-circle-blue-add.png"></a> + src="{% static "images/16-circle-blue-add.png" %}"></a> {% endif %} </div> <div id="filterform" style="padding-top: 1em; display: none"> diff --git a/templates/patchwork/list.html b/templates/patchwork/list.html index 8054063..654fe8c 100644 --- a/templates/patchwork/list.html +++ b/templates/patchwork/list.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% load person %} +{% load static %} {% block title %}{{project.name}}{% endblock %} {% block heading %}{{project.name}}{% endblock %} diff --git a/templates/patchwork/patch-list.html b/templates/patchwork/patch-list.html index f8049f7..675f67f 100644 --- a/templates/patchwork/patch-list.html +++ b/templates/patchwork/patch-list.html @@ -1,5 +1,6 @@ {% load person %} {% load listurl %} +{% load static %} {% include "patchwork/pagination.html" %} @@ -50,7 +51,11 @@ {% ifequal order.name "name" %} <a class="colactive" href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + {% if order.reversed %} + src="{% static "images/16-arrow-up.png" %}" + {% else %} + src="{% static "images/16-arrow-down.png" %}" + {%endif%} width="16" height="16" ></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">Patch</a> @@ -67,7 +72,11 @@ {% ifequal order.name "date" %} <a class="colactive" href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + {% if order.reversed %} + src="{% static "images/16-arrow-up.png" %}" + {% else %} + src="{% static "images/16-arrow-down.png" %}" + {%endif%} width="16" height="16" ></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">Date</a> @@ -84,7 +93,11 @@ {% ifequal order.name "submitter" %} <a class="colactive" href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + {% if order.reversed %} + src="{% static "images/16-arrow-up.png" %}" + {% else %} + src="{% static "images/16-arrow-down.png" %}" + {%endif%} width="16" height="16" ></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">Submitter</a> @@ -101,7 +114,11 @@ {% ifequal order.name "delegate" %} <a class="colactive" href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + {% if order.reversed %} + src="{% static "images/16-arrow-up.png" %}" + {% else %} + src="{% static "images/16-arrow-down.png" %}" + {%endif%} width="16" height="16" ></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">Delegate</a> @@ -118,7 +135,11 @@ {% ifequal order.name "state" %} <a class="colactive" href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + {% if order.reversed %} + src="{% static "images/16-arrow-up.png" %}" + {% else %} + src="{% static "images/16-arrow-down.png" %}" + {%endif%} width="16" height="16" ></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">State</a> |