I'm having trouble finding any related tickets other than this one, which 
is 8 years old:

https://code.djangoproject.com/ticket/10305

On Thursday, September 15, 2016 at 5:34:50 PM UTC-7, Tim Graham wrote:
>
> I think these ideas have been floated before. If you look through the Trac 
> tickets you might find something related. However, your subclass where you 
> store "self.instance" on ModelAdmin is a no no due to thread safety. See 
> http://stackoverflow.com/questions/3388111/modeladmin-thread-safety-caching-issues
>  
> for an explanation.
>
> On Thursday, September 15, 2016 at 6:53:15 PM UTC-4, th...@copperleaf.com 
> wrote:
>>
>> I have a ModelAdmin subclass (code at: <https://dpaste.de/0LAt>) and I 
>> need to do a couple of things, but the functionality seems to be missing:
>>
>> 1. I need to access the model instance to perform some initialization, 
>> but there's no instance member set. There are a few questions on Stack 
>> Overflow on this topic, so I know I'm not alone.
>>
>> 2. I need to initialize my form with a parameter derived from the model 
>> instance. If this were a View, I could just override get_form_kwargs and be 
>> done with it, but ModelAdmin doesn't have it.
>>
>> Is there a reason why those two features are missing from ModelAdmin? 
>> Maybe they could be added (and I could open a PR)? Or is there a better way 
>> to do what I need to do?
>>
>>

-- 
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/43ace9be-231e-4ae9-bc04-b04b201c4962%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to