Re: Updating Context Data in FormView 'form_valid' Method

2011-08-01 Thread Abhilash Inumella
Thanks much for the replies. > As shown above, I update a set of context variables in form_valid and >> > I intend to use these in the template - hence the variables in context >> > dictionary. The problem with this code is that the change in >> > context_var1 isn't seen - might be because 'get_c

Re: Updating Context Data in FormView 'form_valid' Method

2011-08-01 Thread Daniel Roseman
On Monday, 1 August 2011 12:43:23 UTC+1, Tom Evans wrote: > > On Mon, Aug 1, 2011 at 11:08 AM, Abhilash Inumella > wrote: > > Dear all, > > > > I have a class QuestionView which is derived from FormView class. Here > > is the code snippet to explain my problem: > > > > class QuestionView(FormView)

Re: Updating Context Data in FormView 'form_valid' Method

2011-08-01 Thread Tom Evans
On Mon, Aug 1, 2011 at 11:08 AM, Abhilash Inumella wrote: > Dear all, > > I have a class QuestionView which is derived from FormView class. Here > is the code snippet to explain my problem: > > class QuestionView(FormView): >  .. >  context_var1 = y This declares a class attribute called context_

Updating Context Data in FormView 'form_valid' Method

2011-08-01 Thread Abhilash Inumella
Dear all, I have a class QuestionView which is derived from FormView class. Here is the code snippet to explain my problem: class QuestionView(FormView): .. context_var1 = y def form_valid (self, form): ... self.context_var1 = x ... def get_context_data(self, **kwargs):