Retire des chemins hardcodés
Dans la vue `partitions.views.see`, les chemins vers les fichiers ne sont plus hardcodés.
This commit is contained in:
parent
8a08d92210
commit
7d242674f3
3 changed files with 21 additions and 17 deletions
|
@ -30,9 +30,9 @@
|
|||
<ul class="filelist">
|
||||
{% for p in part %}
|
||||
{% if user.is_authenticated and ".pdf" in p.part.url %}
|
||||
<li><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}" class="fichier">{{ p.nom }}</a>
|
||||
<li><a href="{% url "partitions.views.see" nom auteur p.id %}" class="fichier">{{ p.nom }}</a>
|
||||
{% elif user.is_authenticated and ".mp3" in p.part.url %}
|
||||
<li><a href="{% url "partitions.views.see" nom auteur p.part.url|cuturl %}" class="fichier">{{ p.nom }}</a>
|
||||
<li><a href="{% url "partitions.views.see" nom auteur p.id %}" class="fichier">{{ p.nom }}</a>
|
||||
{% else %}
|
||||
<li>{{ p.nom }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue