Error when following along with the tutorial on the Django website
I am following the django tutorial here. I have copied everything exactly. After the part where you enter the python manage.py sql polls command, it returns:
Error:A开发者_开发知识库pp with the label polls could not be found. Are you sure yuor
INSTALLED_APPS setting is correct?
I have the site installed in /home/kevin/crossen/crossen, and the dir listing is
__init__.py
__init__.pyc
manage.py
polls(dir)
settings.py
settings.pyc
testdb(sqlite3 database)
test.db(0bytes)
urls.py
urls.pyc
and the end of my settings.py file looks like this:
INSTALLED_APPS=(
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'crossen.polls'
)
The crossen.polls following the mystie.polls convention found in the guide. I have tried it with just polls, same error. Not sure whats wrong, thanks in advance.
EDIT
Polls dir is:
__init__.py
__init__.pyc
models.py
models.pyc
tests.py
views.py
- Is there an
__init__.py
file in thepolls
directory? - Is
/home/kevin/crossen
on your python path?
To check the path, do:
$ python -c "import sys; print sys.path"
open 'site/settings.py' file and change the INSTALLED_APPS setting to include the string 'your_app'
精彩评论