Form Wizard, using reverse to pass data to extra_context

2009-01-15 Thread coulix
Hi, I use a formWizard for a signup process: url(r'^signup/student/$', SignupStudentWizard([SignupForm, StudentForm]), {'extra_context':{"type":"student"}}, name='signup_student',), Now, used as it is it works fine. However in one case i need to pass extra_context data at run_time,

Re: User in form wizard

2008-12-08 Thread Nathaniel Whiteinge
On Dec 8, 8:00Â am, chewynougat <[EMAIL PROTECTED]> wrote: > Could anyone tell me if I can pass the current user to a form wizard > step so I can prepopulate their object details in the form? If so, > how? It depends on where exactly you need to access the current user. If you c

User in form wizard

2008-12-08 Thread chewynougat
Could anyone tell me if I can pass the current user to a form wizard step so I can prepopulate their object details in the form? If so, how? Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Form Wizard

2008-09-03 Thread lingrlongr
problems with the form > wizard. > > In url.py I have: > >     url(r'refinance/$', RefinanceWizard([RefinanceForm_1, > RefinanceForm_2, DummyForm, DummyForm]), name='refinance'), > > So you can see that I have 4 steps.  The purpose of the DummyForm is > just a place holder.

Form Wizard

2008-09-03 Thread lingrlongr
I'm desperate here. I'm having serious problems with the form wizard. In url.py I have: url(r'refinance/$', RefinanceWizard([RefinanceForm_1, RefinanceForm_2, DummyForm, DummyForm]), name='refinance'), So you can see that I have 4 steps. The purpose of the DummyForm is just a place

Form Wizard template URL

2008-08-31 Thread nss350
Hi, I'm using a form wizard, but can't quite seem to figure out how to set the url for it in a template i.e. what do I put in the {% url %} Another unrelated question. If I'm using the included login, logout views, and I'm trying to get the views to redirect to a path set in the template, how

Re: How to set queryset on the second step of a form wizard?

2008-08-22 Thread rr
http://dpaste.com/73317/ I have dpasted it on the link above Cheers Roy On Aug 21, 2:30 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Aug 21, 11:56 am, rr <[EMAIL PROTECTED]> wrote: > > > The url is herehttp://dpaste.com/72961/ > > I don't see anything glaringly wrong. You mentioned that

Re: How to set queryset on the second step of a form wizard?

2008-08-21 Thread Rajesh Dhawan
On Aug 21, 11:56 am, rr <[EMAIL PROTECTED]> wrote: > The url is herehttp://dpaste.com/72961/ I don't see anything glaringly wrong. You mentioned that it "complains about 'ChannelTypeForm' object has no attribute 'cleaned_data'"...can you dpaste that error trace as well?

Re: How to set queryset on the second step of a form wizard?

2008-08-21 Thread rr
The url is here http://dpaste.com/72961/ -r On Aug 21, 9:39 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Aug 21, 2:06 am, rr <[EMAIL PROTECTED]> wrote: > > > sorry for being annoying > > > It doesn't work, complains about > > 'ChannelTypeForm' object has no attribute 'cleaned_data' > >

Re: How to set queryset on the second step of a form wizard?

2008-08-21 Thread [EMAIL PROTECTED]
Override the process_step method do that when step one is being processed, it creates the queryset to be used by step 2 then. if(step==1): if(form.is_valid()): self.step2_queryset=Book.objects.filter(**form.cleaned_data) elif(step==0): self.step2_queryset=None Then, override the

Re: How to set queryset on the second step of a form wizard?

2008-08-21 Thread Rajesh Dhawan
On Aug 21, 2:06 am, rr <[EMAIL PROTECTED]> wrote: > sorry for being annoying > > It doesn't work, complains about > 'ChannelTypeForm' object has no attribute 'cleaned_data' > when submit on the second step(step1)http://dpaste.com/72840/ Can you also dpaste your URLs.py that shows which form is

Re: How to set queryset on the second step of a form wizard?

2008-08-21 Thread rr
sorry for being annoying It doesn't work, complains about 'ChannelTypeForm' object has no attribute 'cleaned_data' when submit on the second step(step1) http://dpaste.com/72840/ -r On Aug 21, 1:51 am, rr <[EMAIL PROTECTED]> wrote: > Don't worry.Formworks now. Thanks a lot. > > But would be

Re: How to set queryset on the second step of a form wizard?

2008-08-20 Thread rr
Don't worry. Form works now. Thanks a lot. But would be great if you can explain it a bit on how your code works and the sequence of how process_steps and get_form works as I see it seems called a few time between steps Thanks =) -r On Aug 21, 1:42 am, rr <[EMAIL PROTECTED]> wrote: > It works

Re: How to set queryset on the second step of a form wizard?

2008-08-20 Thread rr
It works well. Thanks a lot. But now another problem. It seems "def done " is not working. It loops back to the step1 and def done is never called And do you mind explain how your code works? I did a "print step" before return form in the def get_from, it prints 0, 1, 0. It seems it has been

Re: How to set queryset on the second step of a form wizard?

2008-08-20 Thread Rajesh Dhawan
On Aug 20, 12:57 pm, rr <[EMAIL PROTECTED]> wrote: > Thanks Rajesh > > But...it doesn't work > It complains about form0 doesn't have cleaned_data. I guess > > form0 = super(MyFormWizard, self).get_form(0, data=data) > > only gives you a form with no data?! I just dpasted something that will

Re: How to set queryset on the second step of a form wizard?

2008-08-20 Thread Rajesh Dhawan
On Aug 20, 12:57 pm, rr <[EMAIL PROTECTED]> wrote: > Thanks Rajesh > > But...it doesn't work > It complains about form0 doesn't have cleaned_data. I guess > > form0 = super(MyFormWizard, self).get_form(0, data=data) > > only gives you a form with no data?! Can you dpaste what you've so far?

Re: How to set queryset on the second step of a form wizard?

2008-08-20 Thread rr
Thanks Rajesh But...it doesn't work It complains about form0 doesn't have cleaned_data. I guess form0 = super(MyFormWizard, self).get_form(0, data=data) only gives you a form with no data?! On Aug 20, 11:06 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > > Depending onstep1's

Re: How to set queryset on the second step of a form wizard?

2008-08-20 Thread Rajesh Dhawan
Hi, > Depending on step 1's selection, I want to set the queryset of one of > the fields (a ModelChoiceField) > > e.g. > class StepOneForm(forms.Form): >channelType = > forms.ModelChoiceField(queryset=ChannelType.objects.all()) > class StepTwoForm(forms.Form): >channel =

How to set queryset on the second step of a form wizard?

2008-08-20 Thread rr
Hi Guru, Depending on step 1's selection, I want to set the queryset of one of the fields (a ModelChoiceField) e.g. class StepOneForm(forms.Form): channelType = forms.ModelChoiceField(queryset=ChannelType.objects.all()) class StepTwoForm(forms.Form): channel = forms.ModelChoiceField()

Re: Question about Form Wizard

2008-06-07 Thread Leeland (The Code Janitor)
I am a new Django person as well. There is one other point about storing data in sessions. If you expect the site to grow you should put the session data in a back-end database. This will allow multiple servers to access the data. This is important if you ever want to have load balanced servers

Re: Question about Form Wizard

2008-06-07 Thread Grupo Django
by form.cleaned_data. In the example of the e-commerce, instead of serializing the products, we could serialize the products ids. At this time, I don't need to leave the form and return later, but sometimes I have used wizards implemented with sessions. And that's why I asked the way Form Wizard works. I don't

Re: Question about Form Wizard

2008-06-06 Thread Andrew Ingram
the form in which case store state in a carefully considered session object. - Andrew Grupo Django wrote: > Hi! Just a simple question. > The Form Wizard application stores the data hashed in hidden fields. > Why not in a session? Why is it better? I just want to learn best > practices. &

Re: Question about Form Wizard

2008-06-06 Thread Grupo Django
On 7 jun, 00:05, Grupo Django <[EMAIL PROTECTED]> wrote: > Hi! Just a simple question. > The Form Wizard application stores the data hashed in hidden fields. > Why not in a session? Why is it better? I just want to learn best > practices. > > Thank you. Another quest

Question about Form Wizard

2008-06-06 Thread Grupo Django
Hi! Just a simple question. The Form Wizard application stores the data hashed in hidden fields. Why not in a session? Why is it better? I just want to learn best practices. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Form wizard problem

2008-06-04 Thread tyman26
Unless I am really mistaken, I am pretty sure this is a bug. The "self.step" variable in "wizard.py" is never being updated after the forms are submitted. These are two possible fixes I found: 1. In the method "def __call__(self, request, *args, **kwargs) :" update the self.step variable

Form wizard problem

2008-06-04 Thread tyman26
Hi, I am having a problem getting the form wizard to load a different template for each form. I used the example provided where they name their templates template_0.html, template_1.html ... and so then override the function like this: def get_template(self, step): return 'vlis

Re: Accessing data from previous steps in Form Wizard

2008-04-15 Thread Honza Král
wouldn't corrupt an instance shared across multiple requests for that. On Fri, Apr 11, 2008 at 9:11 PM, leifbyron <[EMAIL PROTECTED]> wrote: > > Hi there, > > I am developing a form wizard comprised of about 20 forms. Some of > those forms require access to the previous

Accessing data from previous steps in Form Wizard

2008-04-11 Thread leifbyron
Hi there, I am developing a form wizard comprised of about 20 forms. Some of those forms require access to the previous forms for validation. Is it possible to pass user-submitted data from previous forms to subsequent forms in a form wizard? Thanks, Leif

Re: Using form wizard to complete form over multiple sessions

2008-04-11 Thread leifbyron
ps > > > > On Mon, Mar 31, 2008 at 11:54 PM, leifbyron <[EMAIL PROTECTED]> wrote: > > >  Hi there, > > >  I have a 20-step form wizard that many users prefer to complete over > >  multiple sessions. I am considering adding save_for_later() and > >  resu

Re: Using form wizard to complete form over multiple sessions

2008-04-11 Thread Honza Král
later and create the form (see Wizard.render and render_template how the data is passed to the template). hope this helps On Mon, Mar 31, 2008 at 11:54 PM, leifbyron <[EMAIL PROTECTED]> wrote: > > Hi there, > > I have a 20-step form wizard that many users prefer to complet

Using form wizard to complete form over multiple sessions

2008-03-31 Thread leifbyron
Hi there, I have a 20-step form wizard that many users prefer to complete over multiple sessions. I am considering adding save_for_later() and resume_form_wizard() functions that would save the serialized form data to the database, and allow users to resume the wizard at a later time. Has

<    1   2