Re: Is this a bug in FormWizard?

2008-12-22 Thread Rajesh Dhawan
> > Your analysis is correct. It's the self.extra_context.update(*) call > in the FormWizard that simply updates the class level copy of that > variable. > > If you instead override "parse_params" as suggested by the comments in > FormWizard, you won't have this problem. To be clearer, in

Re: Is this a bug in FormWizard?

2008-12-22 Thread Rajesh Dhawan
On Dec 19, 2:27 pm, 朱穆穆 wrote: > self.extra_context is a reference of FormWizard.extra_context. > It was empty when the class define, but may not empty when > instantiate. > > class TestWizard(forms.FormWizard): > pass > > tw1 = TestWizard() > tw1(request,

Re: Is this a bug in FormWizard?

2008-12-19 Thread 朱穆穆
self.extra_context is a reference of FormWizard.extra_context. It was empty when the class define, but may not empty when instantiate. class TestWizard(forms.FormWizard): pass tw1 = TestWizard() tw1(request, extra_context={'test1': 1}) # tw1.extra_context is {'test1': 1} tw2 = TestWizard()

Re: Is this a bug in FormWizard?

2008-12-18 Thread Rajesh Dhawan
�� wrote: > On Dec 17, 7:49 am, Rajesh Dhawan wrote: > > On Dec 16, 2:31 am, $B wrote: > > > > > Theextra_contextinFormWizardis a class attribute so the new > > > request may get the context of the previous request. > > > I can prepend

Re: Is this a bug in FormWizard?

2008-12-18 Thread Rajesh Dhawan
朱穆穆 wrote: > On Dec 17, 7:49 am, Rajesh Dhawan wrote: > > On Dec 16, 2:31 am, $B wrote: > > > > > Theextra_contextinFormWizardis a class attribute so the new > > > request may get the context of the previous request. > > > I can prepend below to __call__ method to solved

Re: Is this a bug in FormWizard?

2008-12-17 Thread 朱穆穆
On Dec 17, 7:49 am, Rajesh Dhawan wrote: > On Dec 16, 2:31 am, 朱穆穆 wrote: > > > Theextra_contextinFormWizardis a class attribute so the new > > request may get the context of the previous request. > > I can prepend below to __call__ method to solved

Re: Is this a bug in FormWizard?

2008-12-16 Thread Rajesh Dhawan
On Dec 16, 2:31 am, 朱穆穆 wrote: > The extra_context in FormWizard is a class attribute so the new > request may get the context of the previous request. > I can prepend below to __call__ method to solved it: > > self.extra_context = self.extra_context.copy() > > Is this

Is this a bug in FormWizard?

2008-12-16 Thread 朱穆穆
The extra_context in FormWizard is a class attribute so the new request may get the context of the previous request. I can prepend below to __call__ method to solved it: self.extra_context = self.extra_context.copy() Is this really a bug? --~--~-~--~~~---~--~~

Is this a bug in FormWizard?

2008-12-16 Thread 朱穆穆
The extra_context in FormWizard is a class attribute so the new request may get the context of the previous request. I can prepend below to __call__ method to solved it: self.extra_context = self.extra_context.copy() Is this really a bug? --~--~-~--~~~---~--~~