bugfix NoReverseMatch if category is not translated
This commit is contained in:
parent
9f7584c161
commit
5a4b311e76
1 changed files with 3 additions and 1 deletions
|
@ -18,7 +18,9 @@
|
|||
<ul class="post-detail tags">
|
||||
{% if post.categories.exists %}
|
||||
{% for category in post.categories.all %}
|
||||
<li class="category_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:posts-category' category=category.slug %}" class="blog-categories-{{ category.count }}">{{ category.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
||||
{% if category.slug %}
|
||||
<li class="category_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:posts-category' category=category.slug %}" class="blog-categories-{{ category.count }}">{{ category.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if post.tags.exists %}
|
||||
|
|
Loading…
Reference in a new issue