我有以下内容,但是为什么这不隐藏书评的标签?我收到错误“文本字段”未定义:
from django.db import models
from django.forms import ModelForm, Textarea
class Booklog(models.Model):
Author = models.ForeignKey(Author)
Book_comment = models.TextField()
Bookcomment_date = models.DateTimeField(auto_now=True)
class BooklogForm(ModelForm):
#book_comment = TextField(label='')
class Meta:
model = Booklog
exclude = ('Author')
widgets = {'book_entry': Textarea(attrs={'cols': 45, 'rows': 5}, label={''}),}