django-tracking不使用django1.9

时间:2016-02-16 20:28:42

标签: python django

我正在使用django 1.9和python 2.7。我正在尝试将django-tracking应用程序添加到我的Web应用程序中,但是当我尝试运行时遇到错误 - 码      python manage.py check

错误

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
    django.setup()
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/tracking/__init__.py", line 1, in <module>
    import listeners
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/tracking/listeners.py", line 9, in <module>
    from tracking.models import UntrackedUserAgent, BannedIP
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/tracking/models.py", line 15, in <module>
    from django.contrib.auth.models import User
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/django/contrib/auth/models.py", line 4, in <module>
    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/django/contrib/auth/base_user.py", line 49, in <module>
    class AbstractBaseUser(models.Model):
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/django/db/models/base.py", line 94, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/home/deep/workspace/ptc/local/lib/python2.7/site-packages/django/apps/registry.py", line 239, in get_containing_app_config
    self.check_apps_ready()
  File "/home/deep/workspace/ptc/local/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.

我在settings.py文件中添加了定位应用程序。

0 个答案:

没有答案