Alex Rivera | Logout

Making a field readonly in Django Admin, based on another field's value

Asked 2012-07-22T14:34:41.737
13

How to make a field in Django Admin readonly or non-editable based on the value from another field? I have used readonly_fields=('amount',) but this wont fix my problem , as I need to manage it based on another field .

Edit
Report

1 Answer

0

Declare any permanently readonly_fields in the body of the class, as the readonly_fields class attribute will be accessed from validation

answered 2012-10-09T06:50:47.863

Your Answer