📜  django 文本区域限制字符 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:17.239000             🧑  作者: Mango

代码示例1
class BlogForm(forms.ModelForm):
    class Meta:
        model = Blog
        fields = ['blogPost']
        widgets = {
            'blogPost' : forms.Textarea(attrs={
                'rows': '5',
                'cols': '90',
                'maxlength': '200',
            }),
        }