Mise à jour des urls vers l'ancien dossier /media

On utilise désormais les balises `{% load staticfiles %}` et
`{% static ... %}` pour charger les fichiers au bon endroit.
This commit is contained in:
Martin Pépin 2016-05-26 01:09:31 +02:00
parent af6f56e250
commit 64b0546cc2
14 changed files with 37 additions and 22 deletions

View file

@ -1,7 +1,8 @@
{% load staticfiles %}
{% extends "base_title.html" %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}bda.css" />
<link type="text/css" rel="stylesheet" href="{% static "css/bda.css" %}" />
{% endblock %}
{% block realcontent %}

View file

@ -1,7 +1,8 @@
{% load staticfiles %}
{% extends "base_title.html" %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}bda.css" />
<link type="text/css" rel="stylesheet" href="{% static "css/bda.css" %}" />
{% endblock %}
{% block realcontent %}

View file

@ -1,7 +1,8 @@
{% load staticfiles %}
{% extends "base_title.html" %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}bda.css" />
<link type="text/css" rel="stylesheet" href="{% static "css/bda.css" %}" />
{% endblock %}
{% block realcontent %}

View file

@ -1,7 +1,8 @@
{% load staticfiles %}
{% extends "base_title.html" %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}bda.css" />
<link type="text/css" rel="stylesheet" href="{% static "css/bda.css" %}" />
{% endblock %}
{% block realcontent %}

View file

@ -1,7 +1,8 @@
{% load staticfiles %}
{% extends "base_title.html" %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}bda.css" />
<link type="text/css" rel="stylesheet" href="{% static "css/bda.css" %}" />
{% endblock %}
{% block realcontent %}

View file

@ -1,7 +1,8 @@
{% load staticfiles %}
{% extends "base_title.html" %}
{% block extra_head %}
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}bda.css" />
<link type="text/css" rel="stylesheet" href="{% static "css/bda.css" %}" />
{% endblock %}
{% block realcontent %}

View file

@ -1,8 +1,10 @@
{% load staticfiles %}
<!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" lang="fr">
<head>
<title>{{ site.name }}</title>
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}cof.css" />
<link type="text/css" rel="stylesheet" href="{% static "css/cof.css" %}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
{% block extra_head %}{% endblock %}
</head>

View file

@ -1,3 +1,4 @@
{% load staticfiles %}
{% extends "base_title_petitscours.html" %}
{% block realcontent %}
@ -5,7 +6,7 @@
{% include "details_demande_petit_cours_infos.html" %}
<hr />
<ul>
<li><strong>Traitée</strong>: <img src="{{ MEDIA_URL }}/images/{% if demande.traitee %}yes.png{% else %}no.png{% endif %}" /></li>
<li><strong>Traitée</strong>: <img src="{% static "/images/{% if demande.traitee %}yes.png{% else %}no.png{% endif %}" %}" /></li>
{% if demande.traitee %}
<li><strong>Traitée par</strong>: {{ demande.traitee_par }}</li>
<li><strong>Traitée le</strong>: {{ demande.processed }}</li>

View file

@ -1,3 +1,4 @@
{% load staticfiles %}
<ul>
<li><strong>Date</strong>: {{ demande.created }}</li>
<li><strong>Nom/prénom</strong>: {{ demande.name }}</li>
@ -8,6 +9,6 @@
<li><strong>Fréquence</strong>: {{ demande.freq }}</li>
<li><strong>Matières</strong>: {% for matiere in demande.matieres.all %}{% if forloop.counter0 > 0 %}, {% endif %}{{ matiere }}{% endfor %}</li>
<li><strong>Niveau souhaité</strong>: {{ demande.get_niveau_display }}</li>
<li><strong>Agrégé requis</strong>: <img src="{{ MEDIA_URL }}/images/{% if demande.agrege_requis %}yes.png{% else %}no.png{% endif %}" /></li>
<li><strong>Agrégé requis</strong>: <img src="{% static "/images/{% if demande.agrege_requis %}yes.png{% else %}no.png{% endif %}" %}" /></li>
<li><strong>Remarques</strong>: {{ demande.remarques }}</li>
</ul>

View file

@ -1,11 +1,12 @@
{% load staticfiles %}
{% extends "base_title.html" %}
{% block extra_head %}
<link href="{{ STATIC_URL }}grappelli/jquery/ui/css/custom-theme/jquery-ui-1.8.custom.css" rel="stylesheet" type="text/css" media="screen" title="no title" charset="utf-8" />
<script src="{{ STATIC_URL }}grappelli/jquery/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}grappelli/jquery/ui/js/jquery-ui-1.8.15.custom.min.js" type="text/javascript"></script>
<link href="{{ STATIC_URL }}grappelli/css/tools.css" rel="stylesheet" type="text/css" />
<link href="{{ STATIC_URL }}grappelli/css/jquery-ui-grappelli-extensions.css" rel="stylesheet" type="text/css" />
<link href="{% static "grappelli/jquery/ui/css/custom-theme/jquery-ui-1.8.custom.css" %}" rel="stylesheet" type="text/css" media="screen" title="no title" charset="utf-8" />
<script src="{% static "grappelli/jquery/jquery-1.6.2.min.js" %}" type="text/javascript"></script>
<script src="{% static "grappelli/jquery/ui/js/jquery-ui-1.8.15.custom.min.js" %}" type="text/javascript"></script>
<link href="{% static "grappelli/css/tools.css" %}" rel="stylesheet" type="text/css" />
<link href="{% static "grappelli/css/jquery-ui-grappelli-extensions.css" %}" rel="stylesheet" type="text/css" />
{% endblock %}
{% block realcontent %}

View file

@ -1,3 +1,4 @@
{% load staticfiles %}
{% extends "base_title_petitscours.html" %}
{% block realcontent %}
@ -18,8 +19,8 @@
<td>{{ demande.name }}</td>
<td>{% for matiere in demande.matieres.all %}{% if forloop.counter0 > 0 %}, {% endif %}{{ matiere }}{% endfor %}</td>
<td>{{ demande.created|date:"d E Y" }}</td>
<td style="text-align: center;"><img src="{{ MEDIA_URL }}/images/{% if demande.traitee %}yes.png{% else %}no.png{% endif %}" /></td>
<td>{% if demande.traitee_par %}{{ demande.traitee_par.username }}{% else %}<img src="{{ MEDIA_URL }}/images/none.png" />{% endif %}</td>
<td style="text-align: center;"><img src="{% static "/images/{% if demande.traitee %}yes.png{% else %}no.png{% endif %}" %}" /></td>
<td>{% if demande.traitee_par %}{{ demande.traitee_par.username }}{% else %}<img src="{% static "/images/none.png" %}" />{% endif %}</td>
<td><a href="{% url "petits-cours-demande-details" demande.id %}" class="see_detail">Détails</a></td>
</tr>
{% endfor %}

View file

@ -1,8 +1,9 @@
{% load staticfiles %}
{% extends "base_title.html" %}
{% block extra_head %}
<script src="{{ MEDIA_URL }}js/jquery.min.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}autocomplete_light/autocomplete.js" type="text/javascript"></script>
<script src="{% static "js/jquery.min.js" %}" type="text/javascript"></script>
<script src="{% static "autocomplete_light/autocomplete.js" %}" type="text/javascript"></script>
{% endblock %}
{% block realcontent %}

View file

@ -1,3 +1,4 @@
{% load staticfiles %}
{% extends "base_title_petitscours.html" %}
{% block realcontent %}
@ -15,7 +16,7 @@
</ul>
</div>
{% endif %}
<script src="{{ MEDIA_URL }}js/jquery.min.js" type="text/javascript"></script>
<script src="{% static "js/jquery.min.js" %}" type="text/javascript"></script>
{% if proposals %}
<form method="post">
{% csrf_token %}

View file

@ -1,9 +1,10 @@
{% load staticfiles %}
<script type="text/javascript">
var supernifty_tristate = function() {
var
YES = { image: "{{ MEDIA_URL }}/images/yes.png", state: "yes" },
NO = { image: "{{ MEDIA_URL }}/images/no.png", state: "no" },
NONE = { image: "{{ MEDIA_URL }}/images/none.png", state: "none" };
YES = { image: "{% static "/images/yes.png" %}", state: "yes" },
NO = { image: "{% static "/images/no.png" %}", state: "no" },
NONE = { image: "{% static "/images/none.png" %}", state: "none" };
function tristate_elements() {
if ( document.getElementsByClassName != undefined ) {