class PizzaTopping(models.Model):
    pizza = models.ForeignKey(Pizza,
                              help_text = 'Toppings to go on Pizza:
num in admin is how many will show up in Pizza',
                              edit_inline = models.TABULAR,
                              num_in_admin = 3,
                              core=True)
    topping = models.ForeignKey(Topping)
    amount = models.IntegerField()

You have core=True set on the same field that has edit_inline, which
doesn't make any sense if you read the model documentation. core=True
should only be set on fields other than the ForeignKey field with
edit_inline set. Setting core=True on a field means you're making that
field a required field; it's so the admin knows when a related object
should be deleted, simply by checking if all the core=True fields have
been filled out.

In this particular instance, you've set edit_inline on the pizza
field, which means PizzaTopping shows up as part of the Pizza admin.
Setting core=True on topping and amount would mean both topping and
amount would have to be filled out before the admin site will save a
PizzaTopping object. I don't know what happens if you set core=True
and edit_inline=models.X on the same field, but it probably isn't
pretty.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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