My Model has a CharField called "comments". I want to display this as just a regular paragraph of text, instead of the default html textarea on the Model admin page. How would I go about implementing this change?
+1
A:
You'll want to create a custom widget and override the render()
method.
cpharmston
2010-09-05 18:32:52
is there a way to change the widget at runtime? For example, choose the widget type based logged-in user's permissions
zer0stimulus
2010-09-05 18:46:35
+1
A:
I could be misunderstanding your question, but I think you want to take a look at Django's readonly_fields option.
readonly_fields = ('comments', )
Jason Leveille
2010-09-05 20:33:11