Ticket #6265: modelformwidget.diff

File modelformwidget.diff, 556 bytes (added by Jeff Anderson, 16 years ago)

patch with documentation changes

  • modelforms.txt

     
    311311    ...
    312312    ...     class Meta:
    313313    ...         model = Article
     314
     315If you need to override what widget to use, you need to explicitly specify the
     316form 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
Back to Top