Re: Error when passing arguments to custom __init__ of ModelForm

2010-06-14 Thread Jani Rahkola
Thanks! Yep, it was a problem with the keyword argument 'user'. Solved the issue by first calling the argument 'my_user' and not explicitly stating it in the __init__ function signature. def __init__(self, *args, **kwargs): user = kwargs.pop('my_user', False) ... On Jun 14, 2:25 am, Kare

Re: Error when passing arguments to custom __init__ of ModelForm

2010-06-13 Thread Karen Tracey
On Sun, Jun 13, 2010 at 7:06 PM, Jani Rahkola wrote: > Hei, > > I hope someone could shed some light on this one. > I have these in their appropriate files: > > class ShoppinglistForm(ModelForm): > >def __init__(self, user=False, *args, **kwargs): >ModelForm.__init__(self, *args, **kwa

Re: Error when passing arguments to custom __init__ of ModelForm

2010-06-13 Thread Alexander Jeliuc
Read about python version difference in function overloading domain -->ModelForm.__init__(self, *args, **kwargs) # this can be different On Mon, Jun 14, 2010 at 2:06 AM, Jani Rahkola wrote: > Hei, > > I hope someone could shed some light on this one. > I have these in their appropriate file