Re: Django or python question about classes

2011-11-30 Thread youpsla
Thanks for the link Tom. I'll read that in details later (it's a little bit complicated) an for my POC I'll just use a not DRY method !!! :-) Regards Youpsla On 28 nov, 17:16, Tom Evans wrote: > On Mon, Nov 28, 2011 at 4:07 PM, youpsla wrote: > >

Re: Django or python question about classes

2011-11-28 Thread Tom Evans
On Mon, Nov 28, 2011 at 4:07 PM, youpsla wrote: > Hello, > in my code, I like to overrride the form_valid() method in both > CreateView and UpdateView generic class views. > > I've put my code in views.py. > > class MyCreateView(UpdateView): >    . >    def form_valid(self,

Django or python question about classes

2011-11-28 Thread youpsla
Hello, in my code, I like to overrride the form_valid() method in both CreateView and UpdateView generic class views. I've put my code in views.py. class MyCreateView(UpdateView): . def form_valid(self, form, **kwargs): some code class MyUpdateView(CreateView): .