clean_blog
clean_blog copied to clipboard
评论的时候应显示文本域--修复方法
点击添加评论的时候,现在显示的是一行。改动一个地方(comments/forms.py)就可以显示文本域,注意看最后的Textarea: `from django import forms from .models import Comment
class CommentForm(forms.Form): name = forms.CharField( label='Name', widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Name'}) ) email = forms.EmailField( label='Email', widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Email'}) ) content = forms.CharField( label='Comment', widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Content', 'row': 3}) ) `