views:

54

answers:

1

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:App 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
+1  A: 
  • Is there an __init__.py file in the polls directory?
  • Is /home/kevin/crossen on your python path?

To check the path, do:

$ python -c "import sys; print sys.path"
codeape
I have added /home/crossen/crossen to the path, still have the same error
Kevin
I assume you mean /home/kevin/crossen ? If I understand your directory layout correctly, it is /home/kevin/crossen, NOT /home/kevin/crossen/crossen that should be in python's path.
codeape
sorry, mistype, it is home/kevin/crossen
Kevin
So /home/kevin/crossen is now an item in the sys.path list?
codeape
You say: "I have added ... to the path". By this, do you mean the system PATH or the python interpreter's module search path?
codeape
manage.py is a wrapper for django-admin.py that should automatically add the corresponding site's packages to the site, so perhaps something else is going on here.
Matt Boehm