Both {{ form.myfield.auto_id }}
and {{ form.myfield.id_for_label }}
have the same value. Usually it's "id_myfield".
It is usually used to construct forms, so technically they should always be the same.
<label for="{{ form.myfield.id_for_label }}">...</label>
<input id="{{ form.myfield.auto_id }}" />
But I wonder why id_for_label
even exists, because it just adds unnecessary overhead to something that can be done with only auto_id
. Are there cases where the values are different?