I have this form field:
email = forms.EmailField(
required=True,
max_length=100,
)
It has the required attribute, but in the html it is not adding the html attribute required. In fact it's not even using email as the field type, it's using text... though it appears to get max_length just fine.
Actual:
<input id="id_email" type="text" name="email" maxlength="100">
Expected:
<input id="id_email" type="email" name="email" maxlength="100" required="true">
How can I get Django to use the correct attributes in html forms?