[Django]-How do I get the foreign key values of a form in a template?

6👍

The original model object is available as the instance attribute of the form:

{% for f in form %}
    {{ f.instance.team }}
    {{ f.instance.name.phone }}
{% endfor %}

Leave a comment