Commit 03dfd4f4 authored by Daniele Venzano's avatar Daniele Venzano

Use tornado-style static_url() for static resources in templates

parent 0aa1e20e
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
{% block head %} {% block head %}
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>{% block title %}{% endblock %} - Zoe</title> <title>{% block title %}{% endblock %} - Zoe</title>
<script src="/static/jquery-2.1.4.min.js" type="application/javascript"></script> <script src="{{ static_url("jquery-2.1.4.min.js") }}" type="application/javascript"></script>
<script src="/static/zoe.js" type="application/javascript"></script> <script src="{{ static_url("zoe.js") }}" type="application/javascript"></script>
<link rel="stylesheet" href="/static/zoe.css" type="text/css"> <link rel="stylesheet" href="{{ static_url("zoe.css") }}" type="text/css">
{% endblock %} {% endblock %}
{% block custom_head %} {% block custom_head %}
{% endblock %} {% endblock %}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block content_header %} {% block content_header %}
<div class="header"> <div class="header">
<div id="logos"> <div id="logos">
<img class="logo" src="/static/logo.png" alt="Zoe logo"/> <img class="logo" src="{{ static_url("logo.png") }}" alt="Zoe logo"/>
</div> </div>
<div id="nav"> <div id="nav">
<div class="nav-item"> <div class="nav-item">
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
{% block title %}Inspect execution {{ e.name }}{% endblock %} {% block title %}Inspect execution {{ e.name }}{% endblock %}
{% block custom_head %} {% block custom_head %}
<script src="/static/moment.min.js" type="application/javascript"></script> <script src="{{ static_url("moment.min.js") }}" type="application/javascript"></script>
<script src="/static/moment-timezone.min.js" type="application/javascript"></script> <script src="{{ static_url("moment-timezone.min.js") }}" type="application/javascript"></script>
<script> <script>
let locale = window.navigator.userLanguage || window.navigator.language; let locale = window.navigator.userLanguage || window.navigator.language;
moment.locale(locale); moment.locale(locale);
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
{% block title %}Home{% endblock %} {% block title %}Home{% endblock %}
{% block custom_head %} {% block custom_head %}
<script src="/static/sorttable.js" type="application/javascript"></script> <script src="{{ static_url("sorttable.js") }}" type="application/javascript"></script>
<script src="/static/moment.min.js" type="application/javascript"></script> <script src="{{ static_url("moment.min.js") }}" type="application/javascript"></script>
<script src="/static/moment-timezone.min.js" type="application/javascript"></script> <script src="{{ static_url("moment-timezone.min.js") }}" type="application/javascript"></script>
<script> <script>
function format_timestamp(ts) { function format_timestamp(ts) {
var m = moment.utc(ts); var m = moment.utc(ts);
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
{% block title %}Home{% endblock %} {% block title %}Home{% endblock %}
{% block custom_head %} {% block custom_head %}
<script src="/static/sorttable.js" type="application/javascript"></script> <script src="{{ static_url("sorttable.js") }}" type="application/javascript"></script>
<script src="/static/moment.min.js" type="application/javascript"></script> <script src="{{ static_url("moment.min.js") }}" type="application/javascript"></script>
<script src="/static/moment-timezone.min.js" type="application/javascript"></script> <script src="{{ static_url("moment-timezone.min.js") }}" type="application/javascript"></script>
<script> <script>
function format_timestamp(ts) { function format_timestamp(ts) {
var m = moment.utc(ts); var m = moment.utc(ts);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block title %}Login{% endblock %} {% block title %}Login{% endblock %}
{% block custom_head %} {% block custom_head %}
<script src="/static/jquery.validate.min.js" type="application/javascript"></script> <script src="{{ static_url("jquery.validate.min.js") }}" type="application/javascript"></script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block title %}Zoe system status{% endblock %} {% block title %}Zoe system status{% endblock %}
{% block custom_head %} {% block custom_head %}
<script src="/static/Chart.min.js" type="application/javascript"></script> <script src="{{ static_url("Chart.min.js") }}" type="application/javascript"></script>
<script> <script>
Chart.scaleService.updateScaleDefaults('linear', { Chart.scaleService.updateScaleDefaults('linear', {
ticks: { ticks: {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block title %}ZApp Shop{% endblock %} {% block title %}ZApp Shop{% endblock %}
{% block custom_head %} {% block custom_head %}
<script src="/static/jquery.validate.min.js" type="application/javascript"></script> <script src="{{ static_url("jquery.validate.min.js") }}" type="application/javascript"></script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
......
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