2011-05-27 69 views
-1

我將名爲'politifact'的Django目錄複製到'politifact_omniture-1.0'以測試新的分析代碼。我修改settings.py指向我的模板,然後嘗試使用運行網站:Django ImportError:沒有名爲politifact_omniture-1.0的模塊

python manage.py runserver 

服務器無法啓動並顯示以下消息:

Traceback (most recent call last): 
    File "./manage.py", line 11, in <module> 
    execute_manager(settings) 
    File "/usr/local/lib/python2.6/dist-packages/Django-1.2.4-py2.6.egg/django/core/management/__init__.py", line 436, in execute_manager 
    setup_environ(settings_mod) 
    File "/usr/local/lib/python2.6/dist-packages/Django-1.2.4-py2.6.egg/django/core/management/__init__.py", line 419, in setup_environ 
    project_module = import_module(project_name) 
    File "/usr/local/lib/python2.6/dist-packages/Django-1.2.4-py2.6.egg/django/utils/importlib.py", line 35, in import_module 
    __import__(name) 
ImportError: No module named politifact_omniture-1.0 

是否有設置的行.py我需要修改以通知Django工作目錄已從'politifact'更改爲'politifact_omniture-1.0'?

回答

1

「 - 」和「。」在python模塊名稱中無效,請嘗試使用其他名稱,如politifact_omniture1

相關問題