Thanks, that works very well - but as you mentioned is certainly not intuitive.
Can you use a similar technique to prepopulate fields? My use case is this:- I want to display an INLINE formset. Though records which already exist I want to display but make certain fields uneditable Using the "Extra" I want to give the adminstrator the ability to add an inline record, but restrict certain fields, by making sure that they are prepopulated with data, which are also uneditable. On 18 Feb, 01:25, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Tue, Feb 17, 2009 at 8:23 PM, Malcolm Tredinnick < > > malc...@pointy-stick.com> wrote: > > > On Tue, 2009-02-17 at 17:19 -0800, mermer wrote: > > > Is there a way to display only the values of certain fields in the > > > Admin, so that it is clear that those fields are non-editable? > > > You would have to write a custom form widget to do so. There's nothing > > out-of-the-box yet. We'll get to it one day, but not yet. > > > Malcolm > > Writing a custom widget to do it isn't especially easy because the render > method on widgets doesn't get the initial value, however you can do > it:http://lazypython.blogspot.com/2008/12/building-read-only-field-in-dj... > > Alex > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." --Voltaire > "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---