Smacc Kleina wrote:
Which version of django are you using? In trunk, using newforms/modelforms for generating the form from a model, it is done like this:Hi folks,we have some input forms in our project where 'meta' generated forms are enough. But we have to change widget to tinymce enabled 'richedit' fields in CharFields.Is it possible to change only one widget and keep auto-generated form?
If you want to override a field’s default widget, then specify the widget parameter when declaring the form field:
class ArticleForm(ModelForm):
... pub_date = DateField(widget=MyDateWidget()) ... ... class Meta: ... model = Article Taken from: http://www.djangoproject.com/documentation/modelforms/ Good luck! Jeff Anderson
signature.asc
Description: OpenPGP digital signature

