views:

97

answers:

1

how can we set safe template tag for admin change_form.html, I want to display HTML data instead of TextArea Input for admin form,

I've a django field which is excluded in admin form, that field contains HTML data - which is dynamically generated - u can say reporting data,

I want to display that HTML data with safe templatetag below the other form fields.

+1  A: 

Your question is vague, so it is hard to help you.

If what you are trying to do is display the contents of a field in a read-only manner, Django 1.2 has read-only fields. That will display the contents of the field in text, regardless of the widget that would display for the field if it were not read-only.


Edit: Ah, so you have a field containing HTML and you just want to render its contents at the bottom of the Admin page.

I think the only recourse in this case is to override the django admin template. You will probably have to override change_form.html.

celopes
I've kept the field in excluded list, override the change_view method and kept the field data on extra_context and yes also override change_form.html for my model, thanks
Tumbleweed