from django.forms import ModelForm, Textarea
from myapp.models import Author


class AuthorForm(ModelForm):


    class Meta:
        model = Author
fields = 'name', 'title', 'birth_date'
widgets = {'name': Textarea(attrs={'cols': 80, 'rows': 20})}
How do I set custom HTML attributes in django forms?