0

Is it possible to configure Django admin, so all foreign keys be displayed in the list view as links? Clicking on such a link should open the view for the related object. The closest I could find is list_display_links, which is actually unrelated, because it links to the current object...

AlwaysLearning
  • 7,257
  • 4
  • 33
  • 68
  • Hi again ;-). See this and the comments: https://stackoverflow.com/questions/69753877/how-to-jump-to-a-related-model-object-via-django-admins-list-display/69754075#69754075 – Tonio Nov 18 '21 at 08:52
  • @Tonio Thank you, Tonio. That solution is per model admin. It seems to make sense to actually make this behavior the default for *all* list views in admin. This is what this question is about. – AlwaysLearning Nov 18 '21 at 08:57
  • 1
    I dont know any "automatic" implementation. Seems that the explained in the @Scratch'N'Purr coment its the easiest form, but maybe exists any django package that can do it. – Tonio Nov 18 '21 at 09:11
  • @Tonio Yes, that looks like a doable solution, thank you! Pasting a link here: https://hakibenita.com/things-you-must-know-about-django-admin-as-your-app-gets-bigger#related-fields – AlwaysLearning Nov 18 '21 at 09:38

0 Answers0