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

Fixes #515 - Make it work with Django 4.1 #516

Merged
merged 2 commits into from
Aug 18, 2022
Merged

Conversation

marcusaram
Copy link
Contributor

Easy fix, Django has removed the installed property, but they check if app_config is not None. Took over that check.

@coveralls
Copy link

coveralls commented Aug 16, 2022

Coverage Status

Coverage remained the same at 94.485% when pulling 5503483 on marcusaram:main into c39808d on justquick:main.

@@ -57,7 +57,7 @@ def is_installed(model_class):
Returns True if a model_class is installed.
Copy link
Collaborator

Choose a reason for hiding this comment

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

comments should also be adjusted, i think

Copy link
Contributor Author

@marcusaram marcusaram Aug 16, 2022

Choose a reason for hiding this comment

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

That part is still correct. The method will return True is the model class is installed in Django. If the app is not in the INSTALLED_APPS of Django this will return False. That is also the behavior before. But changed the line below that _meta.installed works reliable from Django 1.7+ to _meta.app_config.

@justquick justquick merged commit 1e1b16f into justquick:main Aug 18, 2022
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.

4 participants