Reputation: 125
Having setup the settings.py file to recognize an installed app of 'blog',
I still get this error
No module named blog
Request Method: GET
Request URL: http // 127dot0dot0dot1:8000 /
Django Version: 1.5
Exception Type: ImportError
Exception Value:
No module named blog
Exception Location: c:\Python27\lib\site-packages\django\utils\importlib.py in import_module, line 35
Python Executable: c:\Python27\python.exe
Python Version: 2.7.2
Python Path:
['c:\\Python27\\Django-1.5\\FirstBlog',
'c:\\Python27\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg',
'c:\\Python27\\lib\\site-packages\\pymysql-0.3-py2.7.egg',
'C:\\Windows\\system32\\python27.zip',
'c:\\Python27\\DLLs',
'c:\\Python27\\lib',
'c:\\Python27\\lib\\plat-win',
'c:\\Python27\\lib\\lib-tk',
'c:\\Python27',
'c:\\Python27\\lib\\site-packages']
Server time: Thu, 28 Mar 2013 16:27:11 +0530
In the shell: ImportError: No module named blog
But the models saves in 'blog' folder are installed on the sqlite3 db using syncdb. Any idea why this happens and how to fix this error?
Upvotes: 2
Views: 6005
Reputation: 1609
You might want to check INSTALLED_APPS
section in you settings.py
file. If 'blog',
is not added you should consider adding. After this you should proceed to python manage.py syncdb
. Last step check your urls.py
and see if all necessary URL mapping exists.
Upvotes: 2