-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid circular import issues. #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking the time to contribute.
It would be nice if you could incorporate the changes requested on the specific lines.
In addition, it would be great if you could change the ones mentioned below as well. It will allow consistency throughout the codebase.`
User = get_user_model() |
Line 14 in f26ce46
User = get_user_model() |
Also, could you please squash your commits into one? It will help us maintain a clean git history. |
could you please squash your commits into one? it will help us in maintaining a clean git history. |
can you update your branch with the latest changes from the |
- move call to get_user_model from a module level to function level in utils. - use settings.AUTH_USER_MODEL in models.
Django documentation recommends using settings.AUTH_USER_MODEL over get_user_model() when you define a foreign key or many-to-many relation to the user model.
https://docs.djangoproject.com/en/3.1/topics/auth/customizing/
helped fix a circular import issue in my project.