The docs say that it's possible although unrecommended to use choices dynamically. http://docs.djangoproject.com/en/dev/ref/models/fields/#choices
However, you could easily do it at the form level or with a custom setter method. On Sep 20, 4:57 pm, Doug <dmee...@gmail.com> wrote: > Lets say for instance that I have the following model, Project, which > is related to an Image model in the following ways: > > class Project(models.Model): > ... > images = models.ManyToManyField(Image, related_name='image') > lead_image = models.ForeignKey(Image, related_name='lead_image') > .... > > Is there any way to set up this relationship so that the lead_image > choices are limited to only those in the "images" manytomany > association of the current instance of Project? > > Thanks for any advice you have. > > Doug --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---