Django ImportError: No module named politifact_omniture-1.0
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
精彩评论