I've been working on a Django project for a while in Eclipse. I'm using the
django-notifications library which has been working fine in Eclipse.
However, when I tried to build the project outside of Eclipse, I got this error:
CommandError: One or more models did not validate:
notifications.notification: 'recipient' defines a relation with the model
'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
This has been bothering me for quite some time now.
I've had a look at questions similar to this one on StackOverflow but none of them have had a solution that worked.
I'm confused as to why this worked in Eclipse but not from the terminal.
This is my custom User model which seems to be causing a problem:
class User(AbstractUser):
coins = models.IntegerField(default=0)
rating = models.IntegerField(default=0)
profile_picture = models.ImageField(upload_to=upload_to)
And then this is the setting in settings.py: (The app is also called User)
AUTH_USER_MODEL = 'User.User'
Why is this error happening and how do I fix it?