Using django.contrib.comments, I've defined a custom comment app. I wanted to override the text area widget so that the textbox appears smaller.
So what I created was this:
#forms.py
class CustomCommentForm(CommentForm):
#...otherstuff...
comment = forms.CharField(label=_('Comment'),
widget=forms.Textarea(attrs={'rows':4}),
max_length=COMMENT_MAX_LENGTH)
But really I don't want to have to redefine the comment field. I want to just redefine the widget that's used by the field. Ie something that it seems only ModelForms can do:
class Meta:
widgets = {
'comment': Textarea(attrs={'rows': 4}),
}
Is there a way to redefine the widget without redefining the field? Or should I just set the height using CSS?