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

Trying to load models in __init__ fails in 1.10 #30

Closed
skorokithakis opened this issue Dec 7, 2016 · 6 comments
Closed

Trying to load models in __init__ fails in 1.10 #30

skorokithakis opened this issue Dec 7, 2016 · 6 comments
Milestone

Comments

@skorokithakis
Copy link
Contributor

Django 1.10 fails with an "Apps are not ready" error when trying to load webpush because it's trying to load its models in __init__.py but models haven't been loaded yet. The project should probably be restructured so it either uses lazy loading or doesn't load anything in __init__.py.

@jamaalscarlett
Copy link
Contributor

jamaalscarlett commented Dec 8, 2016

@skorokithakis Are you using the latest from master, or installing from pypi? This should be fixed in the repo

@skorokithakis
Copy link
Contributor Author

I was using both. It's trying to import utils, which imports models, which fails in 1.10.

@safwanrahman
Copy link
Owner

Oh! I did not notice about it. Going to work on this in this weekend.
Thanks @skorokithakis for the report.

@safwanrahman safwanrahman added this to the version 0.2.1 milestone Dec 10, 2016
@safwanrahman
Copy link
Owner

@skorokithakis I have tested this in my local environment. Can you please recreate your virtualenv and install directly from this repository? I think your virtualenv is using the old version.
pip install https://github.comafwanrahman/django-webpush/archive/master.zip
I am going to push the latest release to pypy within this week

@safwanrahman
Copy link
Owner

@skorokithakis A new release 0.2.1 has been made. Can you please check by installing it and let me know whether it fixes the issue or not?

@skorokithakis
Copy link
Contributor Author

Yep, 0.2.1 works fine, thank you!

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

No branches or pull requests

3 participants