Cleanup routing and remove middleware

This commit is contained in:
Alexandre Iooss 2021-10-23 15:33:14 +02:00
parent 4514d7e020
commit de6088ca5f
7 changed files with 25 additions and 45 deletions

View file

@ -39,7 +39,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% if gallery.extended.tags.all %}
<p class="text-muted">
Tags : {% for tag in gallery.extended.tags.all %}
<a class="badge rounded-pill bg-dark text-decoration-none" href="{% url 'tag-detail' tag.slug %}">{{ tag }}</a>
<a class="badge rounded-pill bg-dark text-decoration-none" href="{% url 'photologue:tag-detail' tag.slug %}">{{ tag }}</a>
{% endfor %}
</p>
{% endif %}
@ -49,14 +49,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
<div class="card-header pb-0 border-bottom-0">
<ul class="nav nav-tabs">
<li class="nav-item">
{% url 'pl-gallery' gallery.slug as url %}
{% url 'photologue:pl-gallery' gallery.slug as url %}
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}">
{% trans "All pictures" %}
</a>
</li>
{% for owner in owners %}
<li class="nav-item">
{% url 'pl-gallery-owner' slug=gallery.slug owner=owner.id as url %}
{% url 'photologue:pl-gallery-owner' slug=gallery.slug owner=owner.id as url %}
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}">
{% if owner.get_full_name %}{{ owner.get_full_name }}{% else %}{{ owner.username }}{% endif %}
</a>
@ -72,7 +72,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% endfor %}
</div>
<div class="card-footer">
<a href="{% url 'gallery-download' gallery.slug %}" class="btn btn-secondary btn-sm">{% trans 'Download all gallery' %}</a>
<a href="{% url 'photologue:pl-gallery-download' gallery.slug %}" class="btn btn-secondary btn-sm">{% trans 'Download all gallery' %}</a>
</div>
</div>
{% endblock %}