I agree that default load-all-options is an annoying default. I just ran
into this problem again myself in the last few weeks. One problem with any
of the alternatives (besides making it readonly by default) is that it
requires the other model to be registered in the admin, which could be also
be annoying for some people.

I hope there's _something_ we can do to somehow improve the situation.
Maybe we could at least improve the examples in the documentation? Maybe
give an example in the docs of a ModelAdmin subclass that defaults to using
raw_id?

On Thu, Jan 17, 2019 at 7:55 AM Carlton Gibson <carlton.gib...@gmail.com>
wrote:

> This topic has come up before.
>
> e.g.
> https://groups.google.com/d/topic/django-developers/md39xtT_JEM/discussion
>
>
> (In which Aymeric suggests something similar to Harro's suggestion here.)
>
> On Thursday, 17 January 2019 06:32:15 UTC+1, Harro wrote:
>
>> If you want it in your whole project you could just extend the ModelAdmin
>> and make the raw_id_fields a property that returns all the fields then use
>> that as a base class for all your ModelAdmins,
>> looking at the code the check if it is a foreignkey happens before that
>> in all cases, so having non foreignkey fields in the list shouldn't matter.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/2ba44b9f-6526-4a6a-8311-632e83aeb4ba%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/2ba44b9f-6526-4a6a-8311-632e83aeb4ba%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFO84S7zSQUCTgzQn_J2fuJwN54LdMqDhirCU7tp%2BL2odHAoPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to