Fix tag display page
This commit is contained in:
parent
292f8e6298
commit
5985b39ed8
2 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@
|
||||||
{% if gallery.extended.tags.all %}
|
{% if gallery.extended.tags.all %}
|
||||||
<p class="text-muted">
|
<p class="text-muted">
|
||||||
Tags : {% for tag in gallery.extended.tags.all %}
|
Tags : {% for tag in gallery.extended.tags.all %}
|
||||||
<a class="badge rounded-pill bg-dark text-decoration-none" href="{% url 'tag-detail' tag %}">{{ tag }}</a>
|
<a class="badge rounded-pill bg-dark text-decoration-none" href="{% url 'tag-detail' tag.slug %}">{{ tag }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ class TagDetail(LoginRequiredMixin, DetailView):
|
||||||
current_tag = self.get_object().slug
|
current_tag = self.get_object().slug
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context['galleries'] = Gallery.objects.on_site().is_public() \
|
context['galleries'] = Gallery.objects.on_site().is_public() \
|
||||||
.filter(extended__tags__name=current_tag)
|
.filter(extended__tags__slug=current_tag)
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue