On Jul 9, 12:19 pm, Rod <[EMAIL PROTECTED]> wrote:
> 1) I can view the Admin screen but I am still unable to view the poll
> app.
>
>  I've added a new class (see below) to mysite/polls/models.py but
> the Admin screen remains unchanged.
>
> class Poll(models.Model):
>     # ...
>     class Admin:
>         pass

That's the correct way to do it. Try restarting the development
server? Usually it handles rebuilding it automatically but sometimes
if you have saved a model with an error in it, it drops that model
until you restart the server.

>
> 2 ) While in the Shell if type "Poll.objects.a() " I get the result
>     [<Poll: Poll object>, <Poll: Poll objects>]
>
>     Why am I getting 2 poll objects and what command can I use to
> delete one.

Read the api documentation. But basically:

polls = Poll.objects.all()
poll = polls[0]
poll.delete()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to