In Django 2.0, autocomplete_fields 
<https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.autocomplete_fields>
 was 
added, which is great.

Without autocomplete_fields, I can change the queryset of a ForeignKeyField 
using formfield_for_foreignkey 
<https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_for_foreignkey>
.

But combining the two together doesn't work - it looks like the list of 
options for autocomplete is dynamic and coming from a different url, 
instead of from the current form.

So the question is -

How can I change the queryset in the autocomplete widget?
Thanks,
Oren

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fd9c8a90-e1f8-47d1-af0a-a110a0b14846%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to