form template django foreach code example Example: django loop through form errors {% for key, value in form.errors.items %}