Django “xxxxxx Object” display customization in admin action sidebar

前端 未结 9 1044
野的像风
野的像风 2020-12-02 10:07

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:

9条回答
  •  一向
    一向 (楼主)
    2020-12-02 10:50

    Since this question is 6 years old, a lot of things have changed. Let me make an update to it.With python3.6 and the latest version of Django (2.1.2) you should always use __str__() in new code. __unicode__() is an old story for python2.7 because in python3, str is unicode.

提交回复
热议问题