When I python3 manage.py makemigrations
, I get bellow error:
...
File \"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-
Has a bit different situation with the same error message:
ValueError: Invalid model reference 'users.models.MyUser'. String model references must be of the form 'app_label.ModelName'.
The error was that I've specified models
in the path to the MyUser
model:
AUTH_USER_MODEL = 'users.models.MyUser'
But we shouldn't do it, we just need specify the package and model name only
AUTH_USER_MODEL = 'users.MyUser'
And error is gone.