Re: Display labels for autocomplete fields

2019-08-11 Thread bjw
Actually, I can think of occasions where what is displayed would vary depending on which model the FK was from, not only on the model that is the target. bjw -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django i

Display labels for autocomplete fields

2019-08-06 Thread bjw
just calls `__str__` on the objects returned. Would it be possible to add a `search_display_fields` on the relevant ModelAdmin, alongside `search_fields` to customise the display in the form select box? This could be either a model field or a callable on the model or modeladmin. Cheers! bjw