Hello I'm trying to restrict my users to have edu emails. I'm using django 1.10 on python 2.7 and Django-registration-redux. I've seen answers like this one but it requires editing the package directly. This seems like a bad idea? I'm using django-custom-user to use the email as a username, and i have extended the user model like so:
models.py
class CustomEmailUser(AbstractEmailUser):
'''
These are inherited from AbstractEmailUser:
id = models.AutoField(primary_key=True) #this is always present, its a django default
email = models.CharField(unique=True, max_length=255)
password = models.CharField(max_length=128)
last_login = models.DateTimeField(blank=True, null=True)
is_superuser = models.BooleanField()
is_staff = models.BooleanField()
is_active = models.BooleanField()
date_joined = models.DateTimeField()
'''
first_name = models.CharField(max_length=50, default='')
last_name = models.CharField(max_length=50, default='')
All the forms are taken care of by these two packages (which is great!) but i'd like to restrict the email domains to .edu and I'm unsure of how to do this without editing the packages directly. Any suggestions? Thanks!