1👍
✅
unique
is not a parameter for forms.EmailField
. You are confusing it with model field I guess.
And you want to use email field for username? If thats the case, try this:
class UserCreationForm(UserCreationForm):
username = forms.EmailField(widget=forms.TextInput(attrs={'maxlength':75}),
label=_("Email"))
And as to your query for “name ‘_’ is not defined” :
from django.utils.translation import ugettext_lazy as _
This is from django.contrib.auth.forms code.
Source:stackexchange.com