id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 11925,Extension to ModelForm,andrew.mcmurry@…,nobody,"Currently when you want to alter the way a model field is represented as a form field, there is an all or nothing approach. To change any of the form field parameters you have to specify them all, duplicating information from the model. Here is an extension to ModelForm that allows selective parameter overriding. An example of use: {{{ class MyModel (models.Model): a = models.CharField(max_length=40) class MyForm (forms.ModelForm): class Meta: model = MyModel fields = ('a',) params = { 'a': { 'widget': forms.TextInput(attrs={'size':40}), 'help_text': ""This form field has the right size"" } } }}} Seeing that the default method to generate a form field from a model field accepts a form_class keyword argument, you can use this to alter the field class used, without altering any of the parameters passed to initialise it. ",,closed,Forms,dev,,fixed,model forms,orutherfurd@…,Unreviewed,1,0,0,0,0,0