I have a fairly big model and on the admin page for that model I have a few inlines that show up at the bottom. I want to be able to link to the admin page for a model instance, and automatically scroll down to an inline so something like /admin/myapp/modelname/pk/#inlinename
I'm not even remotely sure where to start? If anyone can even point me in the right direction that would be great.
Thanks!
Every inline has an id in the form of
[related_name]-group
. If you didn't specify arelated_name
on the relationship then the default related name would be in the form of[lowercase model name]_set
.So, let's say you had a relationship to model,
Foo
, with norelated_name
specified. The inline's id would be#foo_set-group
, which you can link to as anchor.