I think the proposed solution of "you can just extend/subclass ModelAdmin" 
doesn't work, because the fields on different models can have different 
names. I can't just write one global ModelAdmin and then use it for all my 
models, because they'll have different names for their fields. Or if it 
works, it'll need A LOT of introspection (to dynamically check which fields 
are FKs and making them part of raw_id_fields).

Maybe I'm wrong and I'm missing the point, do you folks have an 
implementation of that ModelAdmin superclass to show?

On Thursday, January 17, 2019 at 11:00:42 AM UTC-5, Carlton Gibson wrote:
> On Thursday, 17 January 2019 16:14:31 UTC+1, Collin Anderson wrote:
>> 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
> Off-hand I don't follow you here. Can you explain. 
>> 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?
> An example definitely.
> Maybe we could add an attribute to ModelAdmin with a number: More than 
> this use raw_id — but what would that look like? 
> (Easy subclass rather than a setting...)

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 
For more options, visit https://groups.google.com/d/optout.

Reply via email to