开发者

Django admin render callables in object details page

开发者 https://www.devze.com 2023-02-05 02:51 出处:网络
Is there any way to render a 开发者_JAVA技巧callable method, defined for model, in the admin site except using custom templates? Something similar to the way one can do in list_display.Yes - in Django

Is there any way to render a 开发者_JAVA技巧callable method, defined for model, in the admin site except using custom templates? Something similar to the way one can do in list_display.


Yes - in Django 1.2+, you can use readonly_fields, which works in exactly the same way as list_display.

0

精彩评论

暂无评论...
验证码 换一张
取 消