Error if email field is not unique
See original GitHub issueThe docs quote:
The savvy reader may have noticed that in email_auth.models.User, the email field is not declared as unique. This by the way causes Django to complain during startup with:
However, I see that this is not a warning, it is an error:
$./manage.py makemigrations
SystemCheckError: System check identified some issues:
ERRORS:
email_auth.User: (auth.E003) 'User.email' must be unique because it is named as the 'USERNAME_FIELD'.
settings.py
AUTH_USER_MODEL = 'email_auth.User'
HOP_GUEST_IS_ACTIVE_USER = True
SILENCED_SYSTEM_CHECKS = ['auth.W004']
Shall I make it unique or did I miss a setting?
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Error message: Email Address is not Unique
If you receive an “Email Address Is Not Unique” error message, the first step is to check your system. 1. Use the search...
Read more >Django IntegrityError email is not unique - Stack Overflow
Django IntegrityError email is not unique ; def post(self, request, *args, **kwargs): ; object = self.get_object() form = self.get_form() if form.
Read more >User email address value is not unique - Progress Community
In the User collection only the "username" is a unique field - i.e. The user cannot enter duplicate values. The email field is...
Read more >Asking fields to be unique - FormValidation
Sometime the user need to fill multiple fields in form, also each of them must be unique. Any of them has to be...
Read more >IntegrityError column email is not unique - Google Groups
You'll only get this error if a user checks out using an email address that matches an existing user, not an existing email...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just started to realize the base idea of django-shop.
This setting, that took me the whole day to find it out, brought me in the world of django-cms and I am just starting this trip, it is exciting and it has great views!
OK, I found it.
The docs need to make clear that in the
TEMPLATES > OPTIONS > context_processors
, the'cms.context_processors.cms_settings',
must be included!