开发者

Django ImportError: No module named politifact_omniture-1.0

开发者 https://www.devze.com 2023-03-09 01:43 出处:网络
I copied a Django directory named \'politifact\' to \'politifact_omniture-1.0\' to test new analytics code. I modified settings.py to point to my templates, and then attempted to run the site using:

I copied a Django directory named 'politifact' to 'politifact_omniture-1.0' to test new analytics code. I modified settings.py to point to my templates, and then attempted to run the site using:

python manage.py runserver

The server fails to start with the following message:

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

Is there a line in settings.py that I need to modify to notify Django that the worki开发者_StackOverflow中文版ng directory has changed from 'politifact' to 'politifact_omniture-1.0'?


"-" and "." are invalid in python module names, try some other name like politifact_omniture1

0

精彩评论

暂无评论...
验证码 换一张
取 消