-
Notifications
You must be signed in to change notification settings - Fork 678
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
fix django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. #331
Conversation
@Andrew-Chen-Wang i created this PR to address your comments on #175 |
def __init__(self): | ||
self.user_model = get_user_model() |
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.
Did you check that the authentication.BaseAuthentication
class doesn't have an __init__
method that needs to be called? In other words, should this __init__
method maybe look like this?
def __init__(self): | |
self.user_model = get_user_model() | |
def __init__(self, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self.user_model = get_user_model() |
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.
@davesque according to the source code authentication.BaseAuthentication
doesn’t have __init__
method, i can update it if you want
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.
@davesque i already updated
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.
Yeah, I suppose one could be added in the future. So best to play it safe.
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.
I think it LGTM besides that one inconsistency.
@davesque I'm just noticing this in this PR, but we have a mix of relative import statements and absolute paths for rest_framework_simplejwt
... I prefer absolute, but what's your opinion? I think this is out of scope for this PR though. Good work!
@Andrew-Chen-Wang @davesque how can i help to merge this PR? |
Thanks for all the work on this, guys! |
this PR contains:
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.