[Fixed]-Django Form Failure

1đź‘Ť

âś…

The difference between those is not “separating the fields”. It is that you have switched from the full form representation – including form labels, layout, and most importantly errors – to only displaying the two input fields themselves.

That’s fine to do of course, as for most purposes you will want the extra layout control that it gives you, but you do need to remember to put in all the other things that the basic {{ form }} version does.

{{ form.non_field_errors }}
{{ form.team1.label_tag }}{{ form.team1 }}{{ form.team1.errors }}
{{ form.team2.label_tag }}{{ form.team2 }}{{ form.team2.errors }}

Leave a comment