How to filter ModelAdmin autocomplete_fields results with the context of limit_choices_to
问题 I have a situation where I wish to utilize Django's autocomplete admin widget, that respects a referencing models field limitation. For example I have the following Collection model that has the attribute kind with specified choices. class Collection(models.Model): ... COLLECTION_KINDS = ( ('personal', 'Personal'), ('collaborative', 'Collaborative'), ) name = models.CharField() kind = models.CharField(choices=COLLECTION_KINDS) ... Another model ScheduledCollection references Collection with a