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()
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 it:
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?
--~--~-~--~~~---~--~~
Y
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?
--~--~-~--~~~---~--~~
Y
4 matches
Mail list logo