I'm using Django-allauth in my project, coupled with Django-sesame from login, which sends links by emails for users to login without the password.
However, Django-sesame does not handle signups. I am trying to remove the password fields from the signup form, since passwords are not used for login. I only want users to have to input their email addresses.
Here's what I've got:
FORMS.PY
class CustomUserCreationForm(UserCreationForm):
class Meta(UserCreationForm.Meta):
model = CustomUser
fields = ('username', 'email',)
MODELS.PY
class CustomUser(AbstractUser):
# Add additional fields here. For example, a global-friendly name field
# name = models.CharField(blank=True, max_length=255)
def __str__(self):
return self.email
This code works, but I've tried everything found on the internet and I've not been able to remove the passwords fields. For what it's worth, I would be okay with putting a dummy password for every user, and hide the field, since users must log in through the token email auth.
Thank you!