[Answer]-How to get a certain field out of form in django template?

1👍

Template operators require a space before and after so replace

{% if field.type =='street' %}

with

{% if field.type == 'street' %}

or use the ifequal templatetag

{% ifequal field.type 'street' %}
    Hello world.
{% else %}
    Apocalypse
{% endifequal %}

Leave a comment