Does Field.unique address your needs? ManyToOne may be the better solution...but without models to look at, it may require a validity check at save to confirm that each Pizza only had one of each type of Topping.
Cheers L. On Thu, Jan 17, 2013 at 10:46 AM, acat...@gmail.com <acat...@gmail.com>wrote: > I'm trying to setup a relationship between two django models that is very > similar to the model of a Pizza having many Toppings. However, I need to > make sure that if a Pizza is created then only one Pepperoni topping can be > added. The pizza could have the olive topping and onion topping, etc. But > only one of each. Thanks for any help. > -- ...we look at the present day through a rear-view mirror. This is something Marshall McLuhan said back in the Sixties, when the world was in the grip of authentic-seeming future narratives. He said, “We look at the present through a rear-view mirror. We march backwards into the future.” http://www.warrenellis.com/?p=14314 -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.