1

I am using Django for a project.

I need to be able to pull out the possible categories available.

{% for category in article.categories.all %}
   {{ category.name }} {% if not forloop.last %}, {% endif %}
{% endfor %}

so I can use this on an article page to see what category it is associated with. But how do I pull out the available categories to show as a list.

The Old County
  • 89
  • 13
  • 59
  • 129

0 Answers0