You mean this?

http://code.djangoproject.com/wiki/NewformsHOWTO#Q:HowdoIchangetheattributesforawidgetonasinglefieldinmymodel
.

It seems there is quite a lot of code involved for each readonly field you
want do display... something like readonly_fields would be way better IMHO.

On Fri, Jul 4, 2008 at 10:19 PM, TiNo <[EMAIL PROTECTED]> wrote:

> How about creating a widget that just displays the data? Then override the
> form and use this widget instead of the default widget.
>
>
> On Fri, Jul 4, 2008 at 6:14 PM, Alex Rades <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>> I'm writing an application which makes a pretty heavy use of the
>> newforms-admin administrative site.
>>
>> One recurring need is displaying of informative fields (fields which
>> should not be editable from the admin site, but only viewed).
>> For example, imagine to have a DateField field into a Story class, which
>> is automatically updated every time a user writes a new story. It is
>> desiderable to see this value in the admin site, but has no sense (actually
>> is wrong) to allow modifications to it.
>>
>> Note that this is different from the purpose of the 'editable' attribute,
>> what I'm talking about is a presentation-only feature, and for this reason
>> we could put it into ModelAdmin classes:
>>
>> class StoryOptions(admin.ModelAdmin):
>>     readonly_fields = ('lastupdate',)
>>
>> People have been asking this a lot of times, at least here:
>>
>> http://code.djangoproject.com/ticket/342
>> http://code.djangoproject.com/ticket/611
>> http://code.djangoproject.com/ticket/1714
>> http://code.djangoproject.com/ticket/3990
>>
>> Is there a working solution to display this kind of readonly data in the
>> admin site?
>>
>> Thank you
>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to