On Sun, Nov 26, 2017 at 12:55 AM, Tom Tanner <[email protected]>
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=_("Email"), max_length=254)
>
>  class Meta:
>   model= MyUser
>   fields= ("email",)
>
> The form on the template has three fields: Username, Password and Email,
> in that Order. I want only Email and Password to show up in the form. How
> do I do that?
>
https://docs.djangoproject.com/en/1.11/topics/forms/modelforms/#selecting-the-fields-to-use

> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/4e9a3109-3dd0-4754-91f2-44731154920c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/4e9a3109-3dd0-4754-91f2-44731154920c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BFDnhLt-rz93nqAhOYE_VgWPFCU2pCKjL7qZu2z0u9%3DkBxY-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to