Hi guys, Sidestep question about 'limit_choices_to': is it possible to limit choices of a foreign key according to the value of another field in my model?
In your example, the value 'Administration' is hard-coded... Thanks. > > Sorry Q, > I forgot to add the WorkGroup definition; > > class WorkGroup(models.Model): > groupName = models.CharField(maxlength=50) > > def __str__(self): > return "%s" % self.groupName > > That's where the 'groupName' is coming from in my lookup. > > I'm using rev 2900 (ie the merged MR trunk) so I don't think there's > any other magic going on. I'm guessing your definition of WorkGroup (or > whatever your foreign key is) has a field 'name'. It may be that the > lookup mechanism is checking for the 'name' property, but without > digging into the source, it's just a guess on my part. > > Cheers, > Tone > > > > > Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34 /mn) ; tél : 08 92 68 13 50 (0,34/mn) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---