Re: Two huge forms delema
It did worked! class A(forms.Form) a = field b = field class B(A) c = field def __init__(self): super(B, self).__init__() del self.fields[a] On Jul 15, 7:49 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote: > I don't have much experience with sub-classing forms, but I suspect > `del self.fields[a]` should do the trick. Let us know! > > - whiteinge > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Two huge forms delema
I don't have much experience with sub-classing forms, but I suspect `del self.fields[a]` should do the trick. Let us know! - whiteinge On Jul 15, 7:04 am, Eratothene <[EMAIL PROTECTED]> wrote: > Fixed examples mistakes: > > class A(forms.Form) > a = field > b = field > > class B(A) > del a # Is there working equivalent for this? > c = field > > Hence, class B inherited only a field b, but not a. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Two huge forms delema
Fixed examples mistakes: class A(forms.Form) a = field b = field class B(A) del a # Is there working equivalent for this? c = field Hence, class B inherited only a field b, but not a. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Two huge forms delema
A have two newform classes, each with more than 80 fields. Two forms has a lot of common fields, but not all. In order not to maitain two sets of fields instead of one I have created third form, which is base for inheritance to this two, but then the order of fields in the form is determined by django as : inherited fields - first, own fields - second, which is not what I want. I can't find the way not to maintain two sets of fields. Does any have any ideas? Is it possible in python to make inheritance partial? Something like this: class A(forms.Form) a = field b = field class B(forms.Form) del a # Is there working equivalent for this? c = field Hence, class B inherited only a field, but not b. Please help! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---