Django Forms : height of text area

DJANGO


widgets = {'stock_code': forms.HiddenInput(),'divamt': forms.HiddenInput(),
                   'comments': forms.Textarea(attrs={
                              'style': 'height: 5em;width:5em'}),
                   }

 

 

forms.py 

class stock_dividend_f(ModelForm):
    class Meta:
        model = stock_dividend_m
        fields = '__all__'
        widgets = {'stock_code': forms.HiddenInput(),'divamt': forms.HiddenInput(),
                   'comments': forms.Textarea(attrs={
                              'style': 'height: 5em'}),
                   }

 

            Related