I’m trying to use the new readonly_fields in a ModelForm.
class TrainingAddForm(forms.ModelForm):
class Meta:
model = TrainingTasks
readonly_fields = ('trainee_signed','trainee_signed_date')
But this does not work. Am I missing something or is this not possible?
For doing it in a form, see In a Django form, how do I make a field readonly (or disabled) so that it cannot be edited?