Horje
set form field disabled django Code Example
set form field disabled django
class PatientForm(forms.ModelForm):

    def __init__(self, *args, **kwargs):
       super(PatientForm, self).__init__(*args, **kwargs)
       self.fields['field'].widget.attrs['readonly'] = True

    class Meta:
        model = Patient




Python

Related
python string in set Code Example python string in set Code Example
figsize param in pandas plot Code Example figsize param in pandas plot Code Example
python render_template Code Example python render_template Code Example
python conda how to see channels command Code Example python conda how to see channels command Code Example
python parser txt to excel Code Example python parser txt to excel Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7