bugfix NoReverseMatch if category is not translated

This commit is contained in:
JensDiemer 2015-02-20 17:07:21 +01:00
parent 9f7584c161
commit 5a4b311e76

View file

@ -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 %}