[Python] Django "xxxxxx Object" display customization in admin action sidebar

Discussão em 'Python' iniciado por Stack, Julho 15, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to change the default behavior of how the admin recent changes sidebar displays the name of "objects" added. Refer to the picture below:

    [​IMG]

    I would like to change how these are named in the Admin. Ideally, I would like to be able to change it from "MyModelName object" to, as in the "Policy" object example, something like "Policy: {{ value of the policy's "Policy Name" field. }}.

    I was thinking that __unicode__ for my Patient model handled this, but it doesn't appear to. Any assistance is appreciated.

    Continue reading...

Compartilhe esta Página