Ticket #6265: modelformwidget.diff
File modelformwidget.diff, 556 bytes (added by , 17 years ago) |
---|
-
modelforms.txt
311 311 ... 312 312 ... class Meta: 313 313 ... model = Article 314 315 If you need to override what widget to use, you need to explicitly specify the 316 form field to use, adding the widget parameter to the Field. 317 318 >>> class ArticleForm(ModelForm): 319 ... pub_date = DateField(widget=MyDateWidget()) 320 ... 321 ... class Meta: 322 ... model = Article