How can I change the width of a textarea form element if I used ModelForm to create it?
Here is my product class:
class ProductForm(ModelForm):
    l         
        
Excellent answer by zuber, but I believe there's an error in the example code for the third approach. The constructor should be:
def __init__(self, *args, **kwargs):
    super(ProductForm, self).__init__(*args, **kwargs) # Call to ModelForm constructor
    self.fields['long_desc'].widget.attrs['cols'] = 10
    self.fields['long_desc'].widget.attrs['cols'] = 20
The Field objects have no 'attrs' attributes, but their widgets do.