On Sun, 2007-12-23 at 20:50 -0800, Michel Thadeu Sabchuk wrote: > Hi guys, > > I'm trying to extend a ModelForm, I had success but I must redefine > the Meta class, it doesn't got extended. Is this a bug? See the > following code: > > class Form1(forms.ModelAdmin): > class Meta: > model = SomeType > > class Form2(Form1): > extra_field = forms.CharField(max_length=60) > Meta = Form1.Meta # without this line, the inheritance doesn't > work as expected
Because of the metaclass stuff going on in ModelForms, that's going to be necessary, yes. If you wanted to poke around and create a patch to try and change that, have a shot. Malcolm -- Atheism is a non-prophet organization. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---