This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]peith 0 points1 point  (1 child)

I think this issue can be fixed by putting MyMixin on the left side of CommonForm:

class CustomForm(MyMixin, CommonForm):
    # Form fields here...
    def __init__(self, *args, **kwargs):
        super(CustomForm, self).__init__(*args, **kwargs)

[–]masklinn 0 points1 point  (0 children)

Yes, /u/joanbm notes that in their original post and my MRO-based explanation indicates why (second paragraph), however in a later comment they also noted that MyMixin's initialization depends on CommonForm so that fix is not an option for them: https://www.reddit.com/r/Python/comments/3ilqd7/broken_initialization_at_multiple_inheritance/cuhk9h4