Re: how do I show a non-editable field in the admin site

2009-06-19 Thread Ernst Bunders
t;> I'v been through the sourcecode for a bit to find an answer to this, >> but so far no luck, so I thought I try this. It seems such an obvious >> feature that i can't believe it is missing. >> >> can anybody help? >> >> regards, >> >> Ernst

Re: how do I show a non-editable field in the admin site

2009-06-19 Thread Ernst Bunders
t; ReadOnlyWidget(getattr(obj, field_name), display_value) >     else: > >     form.base_fields[field_name].widget = > ReadOnlyWidget(getattr(obj, field_name).id, display_value) >             form.base_fields[field_name].required = False >     return form >