Sorry for the maybe dumb question, but i'm new to python and django.
I#M just following th tutorial and have a problem at part 2 of it.
When adding the edit_inline parameter to the poll foreign key as
stated in the tutorial i get this error message:

KeyError at /admin/polls/poll/1/
"Could not find Formfield or InlineObjectCollection named
'polls_choice'"
Request Method:         GET
Request URL:    http://127.0.0.1:8000/admin/polls/poll/1/
Exception Type:         KeyError
Exception Value:        "Could not find Formfield or InlineObjectCollection
named 'polls_choice'"
Exception Location:     /usr/lib/python2.5/site-packages/django/oldforms/
__init__.py in __getitem__, line 135

The model looks like this:

from django.db import models

class Poll(models.Model):
    question = models.CharField(maxlength=200)
    pub_date = models.DateTimeField('date published')

    def was_published_today(self):
        return self.pub_date.date() == datetime.date.today()

    def __str__(self):
        return self.question

    class Admin:
        fields = (
            (None, {'fields': ('question',)}),
            ('Date information', {'fields': ('pub_date',), 'classes':
'collapse'}),
        )

class Choice(models.Model):
    poll = models.ForeignKey(Poll, edit_inline=models.STACKED,
num_in_admin=3)
    choice = models.CharField(maxlength=200, core=True)
    votes = models.IntegerField(core=True)

    def __str__(self):
        return self.choice


What am i doing wrong?


--~--~---------~--~----~------------~-------~--~----~
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