question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error if email field is not unique

See original GitHub issue

The 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:closed
  • Created 6 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
raratirucommented, Sep 14, 2017

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!

0reactions
raratirucommented, Sep 13, 2017

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found