标签: python django
from django import forms from .models import Topic class NewTopicForm(forms.ModelForm): message = forms.CharField(widget=forms.Textarea(), max_length=4000) class meta: model = Topic fields = ['subject', 'message']
答案 0 :(得分:1)
Willem Van Onsem是正确的,应该是
class Meta: model = Topic