hi,
maybe this provides a proper solution for you:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.readonly_fields
good luck,
TR
------------------------------------------------
Thanks.
--
Vinicius Massuchetto
On Jan 23, 8:07 am, Peter Phillips <pxph...@gmail.com> wrote:
> Thanks for the reply!
>
> I probably didn't explain the problem properly. I have been using the
> ModelAdmin.readonly_fields option, however it hasn't been doing quite
> what I need for inline formsets. In the case of my inline form, when I
> set some of the fields toreadonly, they end up read only for all
> forms in the formset. That is, every new row that's added to the
> inline formset and all existing ones end up with read only fields.
> What I was hoping to do was override a method to dynamically set some
> fields as read only, but only for some of the forms in the inline
> formset, not all of them.
>
> The following code means that once a row/form in the inline was not
> created by the request.user, all rows/forms becomereadonly. What I'd
> like is to have fields only in the rows they did not create bereadonly, leaving the ones that they did create editable.