Add detail page for tags

This commit is contained in:
Alexandre Iooss 2021-09-23 11:05:04 +02:00
parent 7d700bea36
commit d59fb154b6
6 changed files with 48 additions and 2 deletions

View file

@ -26,7 +26,7 @@
{% if gallery.extended.tags.all %}
<p class="text-muted">
Tags : {% for tag in gallery.extended.tags.all %}
<span class="badge rounded-pill bg-dark">{{ tag }}</span>
<a class="badge rounded-pill bg-dark text-decoration-none" href="{% url 'tag-detail' tag %}">{{ tag }}</a>
{% endfor %}
</p>
{% endif %}

View file

@ -0,0 +1,16 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{{ object.name }}{% endblock %}
{% block content %}
<h1>Tag : {{ object.name }}</h1>
<div class="row mb-2">
{% for gallery in galleries %}
<div class="col-md-3">
{% include "photologue/includes/gallery_sample.html" %}
</div>
{% endfor %}
</div>
{% endblock %}