I don't see an easy way to do this offhand. Filtering the ForeignKey
queryset using ModelAdmin.formfield_for_foreignkey [1] seems close, but I
don't think there's any way to incorporate the values from the M2M field in
your filtering. Have you considered writing some JavaScript to do the
filter
On 19/11/13 17:10, Michal Ludvig wrote:
>
> Hi
>
> I've got two Django models: Contact and Group, where Group has two
> fields: contact and contact_primary linked to Contact. Like this:
>
> |class Group(models.Model):
> name = models.CharField(max_length=200)
> contacts = models.ManyToManyF
Hi
I've got two Django models: Contact and Group, where Group has two
fields: contact and contact_primary linked to Contact. Like this:
|class Group(models.Model):
name = models.CharField(max_length=200)
contacts = models.ManyToManyField(Contact)
contact_primary = models.ForeignKey(Co
3 matches
Mail list logo