tags:

views:

22

answers:

2

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
is there a way to change the widget at runtime? For example, choose the widget type based logged-in user's permissions
zer0stimulus
+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', )

http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.readonly_fields

Jason Leveille
this is actually exactly what I was looking for... thanks!!!
zer0stimulus