I
I
Ilya2015-11-04 22:57:43
Django
Ilya, 2015-11-04 22:57:43

Why can't I migrate to django?

I add the Tastypie application, I prescribe apps.
I'm doing a migration and getting errors.

[email protected] ~/PycharmProjects/kadr_test $ python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 351, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 325, in execute
    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, 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 198, 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/lib/python2.7/dist-packages/tastypie/models.py", line 31, in <module>
    from tastypie.compat import AUTH_USER_MODEL
  File "/usr/lib/python2.7/dist-packages/tastypie/compat.py", line 13, in <module>
    User = get_user_model()
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/__init__.py", line 150, 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.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2015-11-04
@sim3x

stackoverflow.com/questions/25244631/models-arent-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question