[Django]-Access queryset of a modelChoiceField in template tag

3👍

Got it!!!

{% for category in form.category.field.queryset.all %}
    etc
{% endfor %}

Though I deal with a new problem now maybe you know why it would be happening. If I add a new category it won’t show on the Select box, not until I restart the server.

EDIT: It works normally when I use it as normally as {{form.category}}

EDIT2: Edited now it works as it should.

Leave a comment