【问题标题】:django-cacheops doesn't work with Southdjango-cacheops 不适用于 South
【发布时间】:2014-11-07 20:47:47
【问题描述】:

刚刚安装了 django-cacheops。但是,当我尝试运行 python manage.py migratepython manage.py syncdb 时,我得到以下信息:

Traceback (most recent call last):


File "manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/stanleytang/Desktop/DoorDash/Development/doorstep-django/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/Users/stanleytang/Desktop/DoorDash/Development/doorstep-django/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/stanleytang/Desktop/DoorDash/Development/doorstep-django/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/Users/stanleytang/Desktop/DoorDash/Development/doorstep-django/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 75, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/Users/stanleytang/Desktop/DoorDash/Development/doorstep-django/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/Users/stanleytang/Desktop/DoorDash/Development/doorstep-django/venv/lib/python2.7/site-packages/south/management/commands/__init__.py", line 10, in <module>
    import django.template.loaders.app_directories
  File "/Users/stanleytang/Desktop/DoorDash/Development/doorstep-django/venv/lib/python2.7/site-packages/django/template/loaders/app_directories.py", line 25, in <module>
    raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0]))
django.core.exceptions.ImproperlyConfigured: ImportError cacheops: cannot import name app_directories

我正在使用 django 1.6 并使用 django-cacheops 2.1.1

【问题讨论】:

    标签: python django caching django-south


    【解决方案1】:

    这变成了模板中的循环导入,与缓存操作无关。这里是the issue

    带回家:循环导入在 Python 中提供了糟糕的错误消息 :)

    【讨论】:

      猜你喜欢
      • 2012-03-22
      • 2014-08-01
      • 2021-05-10
      • 2013-02-22
      • 1970-01-01
      • 2012-12-23
      • 2018-05-05
      • 1970-01-01
      • 2014-02-11
      相关资源
      最近更新 更多