Fwd: Delivery Status Notification (Failure)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Delivery Status Notification (Failure)

jesmine chaudhuri

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?


Thanks in advance. Please can anyone help me.


Regards


Jesmine

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Delivery Status Notification (Failure)

abhijeet shete
Hi Jasmine,

    First if you are asking about the same question then continue in same thread don't start with new thread every time.

    How you created app using django's startapp command or manually ? Normally if apps folder doesn't contain __init__.py file then it gives this error while executing


python manage.py sql polls
 



Regards.
Abhijeet.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Delivery Status Notification (Failure)

Nick Dokos
In reply to this post by jesmine chaudhuri
jesmine chaudhuri <[hidden email]> 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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.