User representation on Django admin object history page.

45 views
Skip to first unread message

Matheus Bratfisch

unread,
Jul 14, 2016, 3:54:46 PM7/14/16
to django-d...@googlegroups.com
Hello,

I have been trying to update the user text on history of an object page. Looking into django source code I saw get_username being called directly. So overriding the __str__ method on User model will not update the User value on History page. 

Right now the __str__ method of an user is:

def __str__(self): 
    return self.get_username()

Can we update the object_history.html template to use __str__ representation instead of calling get_username method? It seems more correct. What do you guys think?  Or is there a reason to call get_username directly? 



Best regards,
--
Matheus (X-warrior) Bratfisch.
http://matbra.com
Reply all
Reply to author
Forward
0 new messages