Django admin render callables in object details page
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
.
精彩评论