jesmine chaudhuri <jesminechaudhur...@gmail.com> wrote: > Hello, > > I am new in Python and Django. This is my first test project following the > site : > > https://docs.djangoproject.com/en/1.3/intro/tutorial01/ > > I am using database MySQL. > > I configured in > > INSTALLED_APPS = ( > 'django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'polls' > ) > > After that I am trying to run : > > python manage.py sql polls > > But I am getting this error : > > App with label polls could not be found. Are you sure your > > INSTALLED_APPS setting is correct? >
The docs recommend that you add ... 'polls', ) with a final comma, but that's only to prevent you from errors if you add more apps at the end: it should work without the comma if 'polls' is the final element of the tuple. Nevertheless, you probably want to make it a habit to add the comma (which btw is necessary for a one-element tuple - not the case here, but forewarned is forearmed). Do an ``ls'' in the directory where you do the ``python manage.py sql polls'': do you have a subdirectory named `polls' with the standard structure? Below, I have named the project `poll' and the app `polls' (which is a bit confusing, sorry: I should have named the project `poll_project' or something). Here's what I get: ,---- | $ python manage.py sql polls | BEGIN; | CREATE TABLE "polls_poll" ( | "id" integer NOT NULL PRIMARY KEY, | "question" varchar(200) NOT NULL, | "pub_date" datetime NOT NULL | ) | ; | CREATE TABLE "polls_choice" ( | "id" integer NOT NULL PRIMARY KEY, | "poll_id" integer NOT NULL REFERENCES "polls_poll" ("id"), | "choice_text" varchar(200) NOT NULL, | "votes" integer NOT NULL | ) | ; | COMMIT; | | $ ls | manage.py poll polls polls.db | | $ ls polls | admin.py admin.pyc __init__.py __init__.pyc models.py models.pyc tests.py views.py `---- Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.