Skip to content
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

Merged
merged 7 commits into from
Nov 22, 2020

Conversation

hishamkaram
Copy link

this PR contains:

  • fix for django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

@hishamkaram
Copy link
Author

@Andrew-Chen-Wang i created this PR to address your comments on #175

Comment on lines 26 to 27
def __init__(self):
self.user_model = get_user_model()
Copy link
Member

@davesque davesque Nov 13, 2020

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?

Suggested change
def __init__(self):
self.user_model = get_user_model()
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.user_model = get_user_model()

Copy link
Author

@hishamkaram hishamkaram Nov 13, 2020

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davesque i already updated

Copy link
Member

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.

Copy link
Member

@Andrew-Chen-Wang Andrew-Chen-Wang left a 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!

@hishamkaram
Copy link
Author

@Andrew-Chen-Wang @davesque how can i help to merge this PR?

@Andrew-Chen-Wang Andrew-Chen-Wang self-requested a review November 20, 2020 18:58
@davesque
Copy link
Member

Thanks for all the work on this, guys!

@davesque davesque merged commit 148a2e3 into jazzband:master Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants