Re: How do I limit my login form to just email and password?

2017-11-26 Thread Matemática A3K
On Sun, Nov 26, 2017 at 8:57 PM, Tom Tanner wrote: > Adding `exclude=["username"]` does nothing. Same if I replace "username" > with "email" or "user". > it's one or another, you either use 'include' or 'exclude' > > On Sunday, November 26, 2017 at 2:44:44 PM UTC-5, Matemática A3K wrote: >> >>

Re: How do I limit my login form to just email and password?

2017-11-26 Thread Tom Tanner
Adding `exclude=["username"]` does nothing. Same if I replace "username" with "email" or "user". On Sunday, November 26, 2017 at 2:44:44 PM UTC-5, Matemática A3K wrote: > > > > On Sun, Nov 26, 2017 at 12:55 AM, Tom Tanner > wrote: > >> My `models.py` has this: >> class MyUser(AbstractBaseUser):

Re: How do I limit my login form to just email and password?

2017-11-26 Thread mohammad k
forms.py : class LoginUserForm(forms.Form): email = forms.CharField( widget=forms.EmailInput(attrs={'autofocus': True, 'placeholder': 'Email'}), required=True, label='Email :', max_length=255 ) password = forms.CharField( widget=forms.PasswordInp

Re: How do I limit my login form to just email and password?

2017-11-26 Thread Matemática A3K
On Sun, Nov 26, 2017 at 12:55 AM, Tom Tanner wrote: > My `models.py` has this: > class MyUser(AbstractBaseUser): > email= models.CharField(max_length=254, unique=True) > USERNAME_FIELD= "email" > > My `forms.py` has this: > class LoginForm(AuthenticationForm): > email= forms.EmailField(label=_

How do I limit my login form to just email and password?

2017-11-25 Thread Tom Tanner
My `models.py` has this: class MyUser(AbstractBaseUser): email= models.CharField(max_length=254, unique=True) USERNAME_FIELD= "email" My `forms.py` has this: class LoginForm(AuthenticationForm): email= forms.EmailField(label=_("Email"), max_length=254) class Meta: model= MyUser fields= ("