0

我正在从 Django 1.6 升级到 1.7。安装了与 Django 1.7 兼容的 Python 2.7。当我不赞成使用代码“ python -Wall manage.py test”时,我收到以下错误消息:

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 85, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 123, in create
    import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named dashboard

阅读 Django 1.7 发行说明,我了解到“ django.utils.module_loading.import_by_path”已更改为“ import_string()”。我不知道在哪里可以找到这段代码。如果有人可以给我一个指导如何处理这个问题,将不胜感激。

4

1 回答 1

0

好的,这一点想通了。

“非常感谢!我找到了应用程序 'grappelli.dashboard'。dbms/grappelli/ 目录中没有仪表板文件”

于 2017-05-10T18:40:38.183 回答