摘要: 在ModelForm中添加新的属性class AuthorForm(ModelForm): class Meta: model = Author widgets = { 'name': TextInput(attrs={'placeholder': 'name'}), }在Form的成员中添加属性q = forms.CharField(label='search', widget=forms.TextInput(attrs={'placeholder': 'Search'})) 阅读全文
posted @ 2012-11-07 00:00 Mingxx 阅读(602) 评论(0) 推荐(0) 编辑