Change list link to foreign key change page

Posted by Adam on Stack Overflow See other posts from Stack Overflow or by Adam
Published on 2009-09-12T00:18:09Z Indexed on 2010/05/03 11:08 UTC
Read the original article Hit count: 177

When viewing the admin change list for a model, is it possible to make the columns that correspond to foreign keys links to their respective pages? A simple example is I have a Foo object which contains Bar as a foreign key. If I'm viewing the admin change list for Foo (and have it set to include Bar in the display_list columns), the main column would link to the Foo instance's edit page while the Bar column would link to the Boo instance's edit page. I understand I can override the template that's used, but I was curious if there was a solution that didn't require that.

© Stack Overflow or respective owner

Related posts about django

Related posts about django-admin