carltongibson / django-unique-user-email

Enable login-by-email with the default User model for your Django project by making auth.User.email unique.
MIT License
136 stars 6 forks source link

Test Cases and Tutorial #1

Open carltongibson opened 1 year ago

carltongibson commented 1 year ago

There are three levels that should prevent duplicate emails:

  1. ModelForm.
  2. Model.full_clean()
  3. Model.save() (via constraint).

Tutorial

carltongibson commented 1 year ago

Base tests added in https://github.com/carltongibson/django-unique-user-email/commit/69278bf5c68c6ed0b5601b650034f819be1f4871 show the fundamentals.