tags:

views:

12

answers:

0

When I describe admin options for a model it's possible to put any method in 'list_display' then we can add 'allow_tags=True' and get HTML. Is there any same options but for 'changeview' form? I can change template for the form but there is some calculation which returns HTML, so It's not good idea to put them all to a template.

class OrderAdmin(admin.ModelAdmin):
    list_display = ('__unicode__','render_html')

render_html is a method of model, it works in listview, Putting it to 'fields' doesn't work.