On Aug 8, 10:56 am, "Andre Meyer" <
andre.p.me...@gmail.com> wrote:
> hi Daniel
>
> so, it looks like i'm getting there, but there is one problem: do i really
> need to specify all the fields in the form and not just the one i want to
> customise? is there a way to inherit the rest of the fields from a ModelForm
> instance?
>
> thanks
> André
You don't need to specify them all, just the one you want to
customise. The others are automatically picked up from the model
itself. You might need to add the Meta inner class, as below (although
I thought this would be picked up from the ModelAdmin instance).
class MyAdminForm(forms.ModelForm):
mytextfield =
forms.CharField(widget=forms.TextInput(attrs={'size': 35})
class Meta:
model = MyModel
--
DR.