id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 15015 Mixing read-only with ability to add new instances using a FormSet coleifer nobody "A little background, I've been attempting to add permission-awareness to admin inlines using a technique like the one mentioned here: http://code.djangoproject.com/ticket/8060#comment:9 The problem occurs when I want to allow a user to be able to add new inline instances, but display the pre-existing ones as read-only. By overriding the get_readonly_fields() method in the event the user doesn't have change permissions, I'm able to make everything read-only...but this includes the formset's ""extra_forms"", or when the user clicks to add a new row. Since read-only is an admin thing and is implemented in the formset-level as ""exclude"", it's going to be kind of tricky to tell, using just the FormSet API, which fields are actually excluded and which are just read-only. I would propose making readonly_fields an attribute of the form, just like exclude. Additionally, it makes sense to me for any 'extra_forms' on the FormSet to display all non-excluded fields as editable. Having a read-only field on a form that does not contain any data is odd. " New feature new Forms 1.2 Normal formset Florian Apolloner jdunck@… wiml@… Sergey Fedoseev Accepted 0 0 0 0 0 0