Commit 1dd661a7 authored by Miquel Torres's avatar Miquel Torres
Browse files

Use static template tag

parent 80596896
{% load static %}
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
...@@ -5,7 +6,7 @@ ...@@ -5,7 +6,7 @@
<meta name="description" content="{% block description %}A performance analysis tool for software projects. It shows performance regresions and allows comparing different applications or implementations{% endblock %}"> <meta name="description" content="{% block description %}A performance analysis tool for software projects. It shows performance regresions and allows comparing different applications or implementations{% endblock %}">
<meta name="keywords" content="performance, test, plots, charts"> <meta name="keywords" content="performance, test, plots, charts">
<meta charset="UTF-8"> <meta charset="UTF-8">
<link href="{{ STATIC_URL }}css/main.css" rel="stylesheet" type="text/css"> <link href="{% static 'css/main.css' %}" rel="stylesheet" type="text/css">
{% block extra_head %}{% endblock %} {% block extra_head %}{% endblock %}
</head> </head>
<body> <body>
...@@ -15,7 +16,7 @@ ...@@ -15,7 +16,7 @@
{% block page_header %} {% block page_header %}
<a href="{% url 'home' %}"> <a href="{% url 'home' %}">
{% block logo %} {% block logo %}
<img src="{{ STATIC_URL }}images/logo.png" height="48" alt="logo"/> <img src="{% static 'images/logo.png' %}" height="48" alt="logo"/>
{% endblock logo %} {% endblock logo %}
</a> </a>
<h2>{% block page_title %}SPEED CENTER{% endblock page_title %}</h2> <h2>{% block page_title %}SPEED CENTER{% endblock page_title %}</h2>
...@@ -48,11 +49,8 @@ ...@@ -48,11 +49,8 @@
{% endblock %} {% endblock %}
</div> </div>
<script type='text/javascript'> <script type="text/javascript" src="{% static 'js/jquery-1.12.3.min.js' %}"></script>
var STATIC_URL = '{{ STATIC_URL }}'; <script type="text/javascript" src="{% static 'js/codespeed.js' %}"></script>
</script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/codespeed.js"></script>
{% block extra_body %}{% endblock %} {% block extra_body %}{% endblock %}
</body> </body>
</html> </html>
{% extends "codespeed/base_site.html" %} {% extends "codespeed/base_site.html" %}
{% load static %}
{% block title %}{{ block.super }}: Changes{% endblock %} {% block title %}{{ block.super }}: Changes{% endblock %}
{% block description %}{% if pagedesc %}{{ pagedesc }}{% else %}{{ block.super }}{% endif %}{% endblock %} {% block description %}{% if pagedesc %}{{ pagedesc }}{% else %}{{ block.super }}{% endif %}{% endblock %}
...@@ -65,8 +67,8 @@ ...@@ -65,8 +67,8 @@
{% block extra_body %} {% block extra_body %}
{{ block.super }} {{ block.super }}
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.tablesorter.min.js"></script> <script type="text/javascript" src="{% static 'js/jquery.tablesorter.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/changes.js"></script> <script type="text/javascript" src="{% static 'js/changes.js' %}"></script>
<script type="text/javascript"> <script type="text/javascript">
var TIMELINE_URL = "{% url "timeline" %}"; var TIMELINE_URL = "{% url "timeline" %}";
......
{% extends "codespeed/base_site.html" %} {% extends "codespeed/base_site.html" %}
{% load static %}
{% block title %}{{ block.super }}: Comparison{% endblock %} {% block title %}{{ block.super }}: Comparison{% endblock %}
{% block extra_head %} {% block extra_head %}
{{ block.super }} {{ block.super }}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}js/jqplot/jquery.jqplot.min.css" /> <link rel="stylesheet" type="text/css" href="{% static 'js/jqplot/jquery.jqplot.min.css' %}" />
{% endblock %} {% endblock %}
{% block navigation %} {% block navigation %}
...@@ -80,14 +82,14 @@ ...@@ -80,14 +82,14 @@
{% block extra_body %} {% block extra_body %}
{{ block.super }} {{ block.super }}
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{{ STATIC_URL }}js/jqplot/excanvas.min.js"></script><![endif]--> <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{% static 'js/jqplot/excanvas.min.js' %}"></script><![endif]-->
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jquery.jqplot.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jquery.jqplot.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.barRenderer.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.barRenderer.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.categoryAxisRenderer.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.categoryAxisRenderer.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.canvasTextRenderer.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasTextRenderer.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.canvasAxisTickRenderer.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasAxisTickRenderer.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.canvasAxisLabelRenderer.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasAxisLabelRenderer.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/comparison.js"></script> <script type="text/javascript" src="{% static 'js/comparison.js' %}"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
......
{% extends "codespeed/base_site.html" %} {% extends "codespeed/base_site.html" %}
{% load static %}
{% block title %}{{ block.super }}: Timeline{% endblock %} {% block title %}{{ block.super }}: Timeline{% endblock %}
{% block description %}{% if pagedesc %}{{ pagedesc }}{% else %}{{ block.super }}{% endif %}{% endblock %} {% block description %}{% if pagedesc %}{{ pagedesc }}{% else %}{{ block.super }}{% endif %}{% endblock %}
{% block extra_head %} {% block extra_head %}
{{ block.super }} {{ block.super }}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}/css/timeline.css" /> <link rel="stylesheet" type="text/css" href="{% static '/css/timeline.css' %}" />
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}js/jqplot/jquery.jqplot.min.css" /> <link rel="stylesheet" type="text/css" href="{% static 'js/jqplot/jquery.jqplot.min.css' %}" />
{% endblock %} {% endblock %}
{% block navigation %} {% block navigation %}
...@@ -106,19 +108,19 @@ ...@@ -106,19 +108,19 @@
{% block extra_body %} {% block extra_body %}
{{ block.super }} {{ block.super }}
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{{ STATIC_URL }}js/jqplot/excanvas.min.js"></script><![endif]--> <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{% static 'js/jqplot/excanvas.min.js' %}"></script><![endif]-->
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.address-1.6.min.js?autoUpdate=0"></script> <script type="text/javascript" src="{% static 'js/jquery.address-1.6.min.js?autoUpdate=0' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jquery.jqplot.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jquery.jqplot.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.cursor.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.cursor.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.highlighter.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.highlighter.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.dateAxisRenderer.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.dateAxisRenderer.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.categoryAxisRenderer.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.categoryAxisRenderer.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.canvasTextRenderer.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasTextRenderer.min.js' %}"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jqplot/jqplot.canvasAxisLabelRenderer.min.js"></script> <script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasAxisLabelRenderer.min.js' %}"></script>
<script type="text/javascript"> <script type="text/javascript">
var CHANGES_URL = "{% url "changes" %}"; var CHANGES_URL = "{% url "changes" %}";
</script> </script>
<script type="text/javascript" src="{{ STATIC_URL }}js/timeline.js"></script> <script type="text/javascript" src="{% static 'js/timeline.js' %}"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
Timeline.init({ Timeline.init({
...@@ -135,4 +137,3 @@ ...@@ -135,4 +137,3 @@
}); });
</script> </script>
{% endblock %} {% endblock %}
...@@ -66,7 +66,6 @@ TEMPLATES = [ ...@@ -66,7 +66,6 @@ TEMPLATES = [
}, },
] ]
INSTALLED_APPS = ( INSTALLED_APPS = (
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
...@@ -77,11 +76,13 @@ INSTALLED_APPS = ( ...@@ -77,11 +76,13 @@ INSTALLED_APPS = (
'codespeed', 'codespeed',
) )
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASEDIR, "sitestatic") STATIC_ROOT = os.path.join(BASEDIR, "sitestatic")
STATICFILES_DIRS = ( STATICFILES_DIRS = (
os.path.join(BASEDIR, 'static'), os.path.join(BASEDIR, 'static'),
) )
# Codespeed settings that can be overwritten here. # Codespeed settings that can be overwritten here.
from codespeed.settings import * from codespeed.settings import *
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment