1、
https://www.cnblogs.com/zhaoyingjie/p/6160363.html
开始以为是这个样子:
[python] view plain copy
- class BlogForm(forms.Form):
- title = forms.CharField(required = True)
- content = forms.Textarea()
查看文档发现是:
[python] view plain copy
- from django import forms
- class BlogForm(forms.Form):
- title = forms.CharField(required = True)
- content = forms.CharField(widget=forms.Textarea)