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

Use static template tag

parent 80596896
{% load static %}
<!DOCTYPE html>
<html>
<head>
......@@ -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="keywords" content="performance, test, plots, charts">
<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 %}
</head>
<body>
......@@ -15,7 +16,7 @@
{% block page_header %}
<a href="{% url 'home' %}">
{% 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 %}
</a>
<h2>{% block page_title %}SPEED CENTER{% endblock page_title %}</h2>
......@@ -48,11 +49,8 @@
{% endblock %}
</div>
<script type='text/javascript'>
var STATIC_URL = '{{ STATIC_URL }}';
</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>
<script type="text/javascript" src="{% static 'js/jquery-1.12.3.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/codespeed.js' %}"></script>
{% block extra_body %}{% endblock %}
</body>
</html>
{% extends "codespeed/base_site.html" %}
{% load static %}
{% block title %}{{ block.super }}: Changes{% endblock %}
{% block description %}{% if pagedesc %}{{ pagedesc }}{% else %}{{ block.super }}{% endif %}{% endblock %}
......@@ -65,8 +67,8 @@
{% block extra_body %}
{{ block.super }}
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/changes.js"></script>
<script type="text/javascript" src="{% static 'js/jquery.tablesorter.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/changes.js' %}"></script>
<script type="text/javascript">
var TIMELINE_URL = "{% url "timeline" %}";
......
{% extends "codespeed/base_site.html" %}
{% load static %}
{% block title %}{{ block.super }}: Comparison{% endblock %}
{% block extra_head %}
{{ 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 %}
{% block navigation %}
......@@ -80,14 +82,14 @@
{% block extra_body %}
{{ block.super }}
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{{ STATIC_URL }}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_URL }}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_URL }}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_URL }}js/jqplot/jqplot.canvasAxisLabelRenderer.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/comparison.js"></script>
<!--[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 'js/jqplot/jquery.jqplot.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.barRenderer.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.categoryAxisRenderer.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasTextRenderer.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasAxisTickRenderer.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasAxisLabelRenderer.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/comparison.js' %}"></script>
<script type="text/javascript">
$(function() {
......
{% extends "codespeed/base_site.html" %}
{% load static %}
{% block title %}{{ block.super }}: Timeline{% endblock %}
{% block description %}{% if pagedesc %}{{ pagedesc }}{% else %}{{ block.super }}{% endif %}{% endblock %}
{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}/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 '/css/timeline.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'js/jqplot/jquery.jqplot.min.css' %}" />
{% endblock %}
{% block navigation %}
......@@ -106,19 +108,19 @@
{% block extra_body %}
{{ block.super }}
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="{{ STATIC_URL }}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_URL }}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_URL }}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_URL }}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_URL }}js/jqplot/jqplot.canvasAxisLabelRenderer.min.js"></script>
<!--[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 'js/jquery.address-1.6.min.js?autoUpdate=0' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jquery.jqplot.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.cursor.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.highlighter.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.dateAxisRenderer.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.categoryAxisRenderer.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasTextRenderer.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jqplot/jqplot.canvasAxisLabelRenderer.min.js' %}"></script>
<script type="text/javascript">
var CHANGES_URL = "{% url "changes" %}";
</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">
$(function() {
Timeline.init({
......@@ -135,4 +137,3 @@
});
</script>
{% endblock %}
......@@ -66,7 +66,6 @@ TEMPLATES = [
},
]
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
......@@ -77,11 +76,13 @@ INSTALLED_APPS = (
'codespeed',
)
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASEDIR, "sitestatic")
STATICFILES_DIRS = (
os.path.join(BASEDIR, 'static'),
)
# Codespeed settings that can be overwritten here.
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