Re: Require reverse foreign key

2009-10-11 Thread Daniel Roseman
On Oct 11, 12:38 pm, Kristaps Kūlis wrote: > There can be multiple associated Model2 objects to Model1, but without one > Model2  Model1 cannot exist. > > Kristaps Kūlis The best bet is to define custom validation for your inline formset, to ensure that there's at least one valid entry. class

Re: Require reverse foreign key

2009-10-11 Thread Kristaps Kūlis
There can be multiple associated Model2 objects to Model1, but without one Model2 Model1 cannot exist. Kristaps Kūlis BOFH excuse #96: Vendor no longer supports the product On Sat,

Re: Require reverse foreign key

2009-10-09 Thread Bayuadji
On 10/9/09, Kristaps Kūlis wrote: > Hello > > I have such models: > > Class Model1(models.Model): >[content] > Class Model2(models.Model): >model1 = models.ForeignKey(Model1) > > How to ensure that Model1 has at least 1 referenced model ? > data are added using django admin interface,

Require reverse foreign key

2009-10-09 Thread Kristaps Kūlis
Hello I have such models: Class Model1(models.Model): [content] Class Model2(models.Model): model1 = models.ForeignKey(Model1) How to ensure that Model1 has at least 1 referenced model ? data are added using django admin interface, which inlineadmins Kristaps Kūlis Reality is just a c