You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
450 B
18 lines
450 B
# blog/forms.py
|
|
from django import forms
|
|
from .models import Comment
|
|
|
|
class CommentForm(forms.ModelForm):
|
|
class Meta:
|
|
model = Comment
|
|
fields = ['content']
|
|
widgets = {
|
|
'content': forms.Textarea(attrs={
|
|
'rows': 4,
|
|
'placeholder': '请输入您的评论...',
|
|
'class': 'comment-textarea'
|
|
})
|
|
}
|
|
labels = {
|
|
'content': ''
|
|
} |