开始以为是这个样子:

 

[python] view plain copy
 
  1. class BlogForm(forms.Form):  
  2.     title    = forms.CharField(required = True)  
  3.     content  = forms.Textarea()  


查看文档发现是:

 

 

[python] view plain copy
 
    1. from django import forms  
    2.   
    3. class BlogForm(forms.Form):  
    4.     title    = forms.CharField(required = True)  
    5.     content  = forms.CharField(widget=forms.Textarea) 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案