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

django.core.exceptions.AppRegistryNotReady exception in Django 1.10 #11

Open
evdb opened this issue Aug 26, 2016 · 0 comments
Open

django.core.exceptions.AppRegistryNotReady exception in Django 1.10 #11

evdb opened this issue Aug 26, 2016 · 0 comments

Comments

@evdb
Copy link

evdb commented Aug 26, 2016

In Django 1.10 (and 1.9) you can't load models in an apps __init__.py.

Including template_email in an apps INSTALLED_APPS setting leads to the following error:

$ ./manage.py
Traceback (most recent call last):
  File "./manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
   ----- <snip> -----
  File "/Users/evdb/app/.venv/lib/python2.7/site-packages/django/apps/registry.py", line 124, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

A dirty workaround appears to be to move the from django.contrib.auth.models import User statement from the top of __init__.py to somewhere in the send function. However the changes in pull request #10 are more robust.

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

1 participant