>
> 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
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,
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()
�� 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
朱穆穆 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
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
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
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?
--~--~-~--~~~---~--~~
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?
--~--~-~--~~~---~--~~
9 matches
Mail list logo