Hello Community, 

*Goal* : adding a parameter to the add_url embedded by the green cross of a 
foreignkey field in the django-admin details view.


[image: Screenshot 2022-09-08 at 12.00.39.png]

*Solution* : pass my parameter as a widget attrs through the 
*formfield_for_dbfield* method and override the admin template : see code 
paste_bin <https://pastebin.com/gTE6ahwh>

*Issue* : 
- Template gets overriden
- I can't access attrs.my_parameter or attr.my_parameter. It remains empty. 

Am I doing something wrong? Is it a bug ? 


Best, 

Louis

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/889e1ca0-7355-44b8-9ced-cf80897f0476n%40googlegroups.com.

Reply via email to