未能在django 1.7中安装django-chronograph

时间:2014-10-02 14:55:02

标签: django django-chronograph

我尝试将django-chronograph安装到django-1.7,以便在我的django网络应用中分配计划任务。

我按照here所示的说明操作,但在运行python manage.py makemigrationspython manage.py syncdb时出现以下错误:

user@(none):~/mysite$ python manage.py makemigrations
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 385, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute
    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 115, in populate
    app_config.ready()
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/apps.py", line 22, in ready
    self.module.autodiscover()
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py", line 23, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/module_loading.py", line 74, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/chronograph/admin.py", line 2, in <module>
    from django.conf.urls.defaults import patterns, url
ImportError: No module named defaults

django-chronograph不支持django-1.7吗?

2 个答案:

答案 0 :(得分:2)

我从未听说过此软件包,但如果您搜索该错误,则会发现that import path hasn't worked since Django 1.6

它可能只是PyPI版本的旧版本,并且主分支工作正常。但是,这个包的the last commit是在2013年3月,项目的bitbucket页面上有an open issue表示它无法在1.6上工作,所以我对此表示怀疑。 / p>

总之,看起来这个软件包既不支持Django 1.6也不支持1.7。

答案 1 :(得分:0)

They already committed a fix,为了摆脱这个错误,请不要通过:

pip install django-chronograph

我刚刚在Django 1.8上安装了没有问题(到目前为止......)使用:

pip install -e hg+https://bitbucket.org/wnielson/django-chronograph@f561106f6aaab62f2817e08e51c799320fd916d9#egg=django-chronograph