views:

28

answers:

2

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?

A: 
Andrew
A: 

For doing it in a form, see http://stackoverflow.com/questions/324477/in-a-django-form-how-to-make-a-field-readonly-or-disabled-so-that-it-cannot-be

lazerscience
Thanks, your links made things a lot clearer.
normic