1👍
You need to pass the .slug
of the tag
as parameter of the URL, so:
<a href="{% url 'article-list-by-tag' tag=tag.slug %}" class="badge badge-info" >{{ tag }}</a>
If you import it with a namespace, you need to prefix the name of the view with that prefix, so 'some_namespace:article-list-by-tag'
.
0👍
In case it helps anyone, the following code worked for my use-case:
<a href="{% namespace_url 'article-list-by-tag' tag=tag.slug %}" class="badge badge-info" >{{ tag }}</a>
Where the namespace_url
is a template tag provided by DjangoCMS.
- [Answered ]-Celery – resubmit failed task chain after max retries exceeded
- [Answered ]-Django admin – Add button for ForeignKey in inline
- [Answered ]-Updating model objects in the database on Django
- [Answered ]-Tornado + Momoko. Restart corrupted connection
Source:stackexchange.com