When developing a django web resource, I decided to use the loginza application. When setting up, an exception occurs:

Traceback (most recent call last): File "manage.py", line 9, in <module> django.setup() File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 21, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python2.7/dist- packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/usr/local/lib/python2.7/dist-packages/loginza/models.py", line 7, in <module> User = get_user_model() File "/usr/local/lib/python2.7/dist- packages/django/contrib/auth/__init__.py", line 137, in get_user_model return django_apps.get_model(settings.AUTH_USER_MODEL) File "/usr/local/lib/python2.7/dist- packages/django/apps/registry.py", line 199, in get_model self.check_models_ready() File "/usr/local/lib/python2.7/dist- packages/django/apps/registry.py", line 131, in check_models_ready raise AppRegistryNotReady("Models aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet. 

I read the documentation and checked all the options that are listed there. https://docs.djangoproject.com/en/dev/ref/applications/#troubleshooting The result is the same. As soon as I remove the loginza application from the INSTALLED_APPS project immediately starts up without problems.

setting manager.py:

 if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE","tetrakub.settings.dev") import django django.setup() from django.core.management import execute_from_command_line execute_from_command_line(sys.argv): 

You also created your own User class:

 AUTH_USER_MODEL = 'registration.CustomerUser' 

What could be the problem?

    1 answer 1

    Apparently we are talking about this package - django-loginza . Here you have the same problem as you. The author of the package, judging by the comments, fixed this problem, but judging by the pypi did not upload the update. Try removing the package and installing the dev version from github:

     pip uninstall django-loginza pip install -e git+https://github.com/vgarvardt/django-loginza.git#egg=django-loginza 
    • Unfortunately, this did not help either. The result does not change. I decided to try using another project . - EightyEighth