Re: Django FormWizard Keep Values Between Steps

2016-10-07 Thread ludovic coues
I would use only one form and only display a few field on each step of the wizard 2016-10-07 5:39 GMT+02:00 Nelson Diaz : > # forms.py > class ContactForm1(forms.Form): > subject = forms.CharField(max_length=100) > > class ContactForm2(forms.Form): > sender = forms.CharField(required=False

Django FormWizard Keep Values Between Steps

2016-10-07 Thread Nelson Diaz
# forms.pyclass ContactForm1(forms.Form): subject = forms.CharField(max_length=100) class ContactForm2(forms.Form): sender = forms.CharField(required=False) class ContactForm3(forms.Form): message = forms.CharField(widget=forms.Textarea,required=False) # views.pyclass ContactWizard(Se

Form Container for Django Formwizard only shows labels

2015-09-16 Thread Jur Remeijn
So in my Django project, I am using a formwizard for a multi-page form. On one of those pages, I want a form as well as a formset (sadly, this is absolutely necessary). The formwizard can do these things separately but not together, so I found this ticket <https://code.djangoproject.com/tic

FormWizard, FileField and going back

2015-02-06 Thread Roodie
Hey all, I've run into a strange problem. I have a rather large model for a school application process. I am using the FormWizard feature with a SessionWizardView and 3 ModelForms to present the entry fields in manageable chunks. Everything is working properly, except the 3 FileFields.

Re: Unable to save object with images while using FormWizard in Django 1.7 and Python 3.4

2015-01-27 Thread Collin Anderson
Hi, Use items() instead of iteritems(). Collin On Thursday, January 22, 2015 at 11:31:23 AM UTC-5, Frankline wrote: > > ​Hi all​, > I am having a problem saving a Django form using the *FormWizard > <https://docs.djangoproject.com/en/1.7/ref/contrib/formtools/form-wizard/&g

Unable to save object with images while using FormWizard in Django 1.7 and Python 3.4

2015-01-22 Thread Frankline
​Hi all​, I am having a problem saving a Django form using the *FormWizard <https://docs.djangoproject.com/en/1.7/ref/contrib/formtools/form-wizard/>* while using *Django 1.7* and *Python 3.4*. Below is my code: *models.py* ...class Advert(models.Model): ... # Some irelevant code remov

Re: FormWizard confirmation step logic and Allow dynamic form classes with WizardView

2014-05-12 Thread Fabio Caritas Barrionuevo da Luz
/thenewguy/django_formwizard_mixins/pull/2 Em quarta-feira, 7 de maio de 2014 17h43min57s UTC-3, Fabio Caritas Barrionuevo da Luz escreveu: > > Hello django users. > > About the ticket 21644[1] - "FormWizard needs confirmation step logic" > and ticket 21667[2] - "A

FormWizard confirmation step logic and Allow dynamic form classes with WizardView

2014-05-07 Thread Fabio Caritas Barrionuevo da Luz
Hello django users. About the ticket 21644[1] - "FormWizard needs confirmation step logic" and ticket 21667[2] - "Allow dynamic form classes with WizardView" I would like your opinions about the proposed implementation by user nickname123[3]. Remember that an implementat

Odd error using Formwizard

2014-04-07 Thread Griffin Caprio
Hi, I have a form wizard view with 2 required forms & 1 optional form in it. I'm seeing an occasional error during submission. Here's my named forms: DONATE_FORMS = [("donate", DonateFormItemInformation), ("delivery", DonateFormDeliveryMethod), ("about", DonateFormAbout)] My URL entry: login_

Re: django formwizard NoFileStorageConfigured

2013-10-04 Thread Adonis Nafeh
I ran into the same error. Using files in formwizard requires configuring File Storage, according to docs https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/#handling-files initializing file_storage fixed it for me. from django.core.files.storage import FileSystemStorage

"condition_dict" and "get_cleaned_data_for_step" triggers multiple queries in FormWizard

2013-03-14 Thread Einsiedlerkrebs
Hi, I made a FormWizard with Django 1.4 according to the FormWizard-documentation<https://docs.djangoproject.com/en/1.4/ref/contrib/formtools/form-wizard/>with *different templates for each form* and *Conditionally view*. It works, but I found a problem with the *Conditionally view

How to update a form in formwizard

2013-03-07 Thread Rob
I have a problem with formwizard. In step 3 of the wizard I use a filtered query which depends on choices from step 1 and 2. My wizard works fine when moving forward, but when a user presses previous, or changes the choices of step 1 and 2, things go wrong (validation error or filters won&#

Re: get_form in formwizard gives validation error

2013-03-07 Thread Rob
I am a bit further now. When I use the default widget in forms.py the validation error disappears. BoekForm3 becomes: Activiteit = forms.ModelChoiceField(queryset=Activiteit.objects.all(), empty_label="(Nothing)") I ran into another issue however (below is my complete view): I use get_form to ma

get_form in formwizard gives validation error

2013-03-05 Thread Rob
In a formwizard I want to use a custom query, based on previous choices. The form renders well, but when the step is submitted I get an "Select a valid choice. That choice is not one of the available choices." error Here is the get_form part in my views.py (simplified): def get

FormWizard - Sesssions

2013-01-04 Thread Kristofer
Hello, I am using FormWizard with SessionWizardView. The form is working as expected by using the submit or previous buttons, but if the user goes to a different link on the site, and then back to where the form was, the form starts out fresh. I have verified with Developer Tools that the

Re: django formwizard NoFileStorageConfigured

2012-10-23 Thread Russell Keith-Magee
; family_wizard = FamilyWizardView.as_view(**named_family_forms, >> url_name='family_step', done_step_name='family_wizard'**) >> >> File "python2.7/site-packages/**django_formwizard-1.0-py2.7.**egg/ >> formwizard/views.py", line 109, in as_view >

Re: django formwizard NoFileStorageConfigured

2012-10-23 Thread Kenneth Love
_family_forms, > url_name='family_step', done_step_name='family_wizard') > > File "python2.7/site-packages/django_formwizard-1.0-py2.7.egg/ > formwizard/views.py", line 109, in as_view > > initkwargs = cls.get_initkwargs(*args, **kwargs) > > File &

FormWizard for shop checkout

2012-10-22 Thread KentH
Hi, I'm trying to use FormWizard for an e-checkout application. Trying to perform the actual "charge" in the "done" step is problematic as you can't go back if the charge fails. Is there a right way to do this? For example of what steps look like, just imagi

Re: Testing FormWizard

2012-08-06 Thread jscn
On Tuesday, 7 August 2012 10:30:22 UTC+8, jscn wrote: > On Monday, 9 July 2012 16:43:19 UTC+8, James Rivett-Carnac wrote: > > > I am trying to write test cases for a django 1.4 CookieWizardView > > (django.contrib.formtools.wizard.views.CookieWizardView), and I'm not sure > > how to handle sen

Re: Testing FormWizard

2012-08-06 Thread jscn
On Monday, 9 July 2012 16:43:19 UTC+8, James Rivett-Carnac wrote: > I am trying to write test cases for a django 1.4 CookieWizardView > (django.contrib.formtools.wizard.views.CookieWizardView), and I'm not sure > how to handle sending multiple posts to the view. > > class TestWizardView(TestCas

Re: Validation error with formwizard and formset

2012-07-21 Thread Rob
The validation error i got was due to a custom view i wrote, and had nothing todo my my template etc etc. I switched back to the default example view provided by the Django site, and everything works. -- You received this message because you are subscribed to the Google Groups "Django users" g

Validation error with formwizard and formset

2012-07-21 Thread Rob
I have a basic formwizard example from the Django 1.4 documentation: https://docs.djangoproject.com/en/1.4/ref/contrib/formtools/form-wizard/ When I replace the forms with a modelform and a formset i keep getting validation errors: (ManagementForm data is missing or has been tampered with) The

Testing FormWizard

2012-07-09 Thread James Rivett-Carnac
I am trying to write test cases for a django 1.4 CookieWizardView (django.contrib.formtools.wizard.views.CookieWizardView), and I'm not sure how to handle sending multiple posts to the view. class TestWizardView(TestCase): def setUp(self): self.form_one_post = QueryDict('field_1=valu

Re: Stuck with a dynamic form within formwizard

2012-06-24 Thread het.oosten
I saw that lots will change in formwizard in future releases of Django, and i could not get this working. Therefore i switched to Jquery formwizard http://thecodemine.org/ This plugin makes it possible to show parts of forms on different pages (and do some server side validation when switching

Stuck with a dynamic form within formwizard

2012-06-21 Thread het.oosten
= formsets.formset_factory(DishesForm) class TestWizard(FormWizard): def done(self, request, form_list): return render_to_response('testwizard', { 'form_data': [form.cleaned_data for form in form_list], }) * ur

django formwizard NoFileStorageConfigured

2012-03-11 Thread danoro
ily_wizard = FamilyWizardView.as_view(named_family_forms, url_name='family_step', done_step_name='family_wizard') File "python2.7/site-packages/django_formwizard-1.0-py2.7.egg/ formwizard/views.py", line 109, in as_view initkwargs = cls.get_initkwargs(*args,

how to use formwizard with parametrized urls

2012-03-01 Thread danoro
How do I use formwizard within parametrized URLs ? This is my urls.py from accounts.jobs.views.wizard import JobWizardView named_job_forms = ( ('narrative', JobNarrativeForm), ('location', JobLocationForm), ('dedication', JobDedicationForm), (&#x

formwizard not ready for parametrized urls

2012-02-27 Thread danoro
Please pay attention to this piece of code: formwizard/views.py class NamedUrlWizardView(WizardView): def get(self, *args, **kwargs): """ This renders the form or, if needed, does the http redirects. """ step_url = kwargs.get(&#x

Formwizard and manytomany

2011-11-25 Thread Arthur Fortes
Hello, I'm new in Django and I got a problem with a formwizard. My manytomany dont works with formwizard. When I try appears this error : 'areaes' is an invalid keyword argument for this function. What I should do? models.py >areaes = models.ManyToManyField(areavaga,ver

Django FormWizard - How do you dynamically create a formset based on previous step

2011-11-17 Thread Steven Klass
Hi All, (Sorry for the cross post to Stackoverflow as well - I'm really pulling my hair out on this one!) Posted on http://stackoverflow.com/questions/8172398/django-formwizard-how-do-you-dynamically-create-a-formset-based-on-previous-st I've seen [this][1] post and it's not w

FormWizard and "add to basket" problem

2011-11-16 Thread Andy Robinson
We need to code a 5-step form wizard. The first step should let you select products with various options, validate them, then add those items to a basket, then proceed when you are ready. The next few steps are straightforward - personal details, delivery details, payment. The FormWizard in

url parameters in Formwizard

2011-11-08 Thread Alexander Ayasca Esquives
I'm using the development version of django-formwizard (https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/), how could I send parameters through a url to a wizardview ? this is mi url: r'^buscar/control/(?P\d+)', form_control_nino.as_view([ ControlFo

Re: Formwizard - Many2Many field - instance needs to have a primary key value before a many-to-many relationship can be used

2011-11-02 Thread youpsla
Thanks Furbee, UNDERSTOOD. Thanks again for detailled and instructive answers. Alain On 2 nov, 21:36, Furbee wrote: > Hi Alain, > > Sort of. With this code: >     if field == 'category': >         instance.save() > a Customer with 50 categories would write to the database 51 times (1 > INSERT,

Re: Formwizard - Many2Many field - instance needs to have a primary key value before a many-to-many relationship can be used

2011-11-02 Thread Furbee
Hi Alain, Sort of. With this code: if field == 'category': instance.save() a Customer with 50 categories would write to the database 51 times (1 INSERT, and 50 UPDATES). Including the "instance.id == None" like this: if field == 'category' and instance.id == None: instance

Re: Formwizard - Many2Many field - instance needs to have a primary key value before a many-to-many relationship can be used

2011-11-02 Thread youpsla
Hi again thanks for explanations. I've understood difference between Null and None. I've modify the code to add "instance.id == Non" and it seems to be faster. To be sure. You mean that if a customer has 1 category, there will be 2 database access (one for all informations except category and on

Re: Formwizard - Many2Many field - instance needs to have a primary key value before a many-to-many relationship can be used

2011-11-02 Thread Furbee
Hi Alain, Glad that it worked out! :-) To clarify, a blank is different from a Null, or "None" in Python/Django. A blank character field is "" where a null character field is NULL. If a field does not specify null=True, and you try to save an instance of that object without specifying that field,

Re: Formwizard - Many2Many field - instance needs to have a primary key value before a many-to-many relationship can be used

2011-11-02 Thread youpsla
Oupsss, another question in the step by step: 1 class InscriptionWizard(SessionWizardView): 2    def done(self, form_list, **kwargs): 3        instance = Customer() 4        for form in form_list: 5            for field, value in form.cleaned_data.iteritems(): 6                if field == 'categor

Re: Formwizard - Many2Many field - instance needs to have a primary key value before a many-to-many relationship can be used

2011-11-02 Thread youpsla
Hi Furbeenator, thanks a lots, it works !!! :-))) I've use your first solution. You say that "category would have to be the first Allow Null field in your model" wich is not the case here. A "phone" field is the first step (Step0) can be empty : telephone = models.CharField(max_length=14, blank=Tr

Re: Formwizard - Many2Many field - instance needs to have a primary key value before a many-to-many relationship can be used

2011-11-02 Thread Furbee
In your Customer model there are fields which cannot be Null, so you cannot instance.save() before setting those properties. So, you may have to check for the category field in your loop and if it is category, save the instance first. Something like the following: views.py (in clients application)

Formwizard - Many2Many field - instance needs to have a primary key value before a many-to-many relationship can be used

2011-11-02 Thread youpsla
Hello, i'm currently doning a website where user can register (without password, without auth module of Django). They put some informations and at the end (Step5Form) do multiple choices by clicking on checkboxes. When I click on validate on the last step I've "instance needs to have a primary key

Re: new formwizard - how to pass data between forms

2011-10-31 Thread Kurtis Mullins
implementation. > At least the release notes for 1.4 say: > "It features a pluggable storage API and doesn’t require the wizard to > pass around hidden fields for every previous step." > But checking the example apps (https://github.com/stephrdev/django- > formwizard/blob

Re: new formwizard - how to pass data between forms

2011-10-31 Thread andreas
pps (https://github.com/stephrdev/django- formwizard/blob/master/test_project/testapp2/views.py#L20) i found what i was looking for: get_cleaned_data_for_step() It does exactly what i need :-) On 31 Okt., 03:07, Kurtis Mullins wrote: > I haven't read that particular back ports docs but wh

Re: new formwizard - how to pass data between forms

2011-10-30 Thread Kurtis Mullins
lps a little :) Sent from my iPad On Oct 29, 2011, at 11:19 AM, andreas wrote: > Hi all, > > i am using the backport of django's new formwizard (https://github.com/ > stephrdev/django-formwizard). > and i am looking for the recommended way to pass data between th

new formwizard - how to pass data between forms

2011-10-29 Thread andreas
Hi all, i am using the backport of django's new formwizard (https://github.com/ stephrdev/django-formwizard). and i am looking for the recommended way to pass data between the different forms/steps. Basically i am using the formwizard to process a series of forms that let the user (fu

Re: Formwizard - Validation with a database lookup

2011-10-25 Thread youpsla
Hello, I've done it !!! yooohooo. But I think this is not the best way because it can be processor time consuming if I've a lots of suscribers (Wich is not the case now). Here is the code in forms.py: class Step1Form(forms.Form): email_adresse = forms.EmailField(max_length=255) telephone

Formwizard - Validation with a database lookup

2011-10-25 Thread youpsla
Hello, I've setup a 5 steps form (There is only one table in the database). In the first step I ask for Email adresse. I ike this to be unique in the database. By putting parameters "unique=True" in models, the error only raise when submitting the form at the last step. Is there a way to do the

ModelForm - formwizard - Form on multiple pages

2011-10-22 Thread youpsla
just want this field to be the link between the two tables. I don't want a drop down menu be generated by the formwizard in the step 2. Is this one the good way to do things or maybe do I have to put all datas in one table and use partial forms for each step ? Maybe is there another way of doing

FormWizard not save data

2011-05-18 Thread Felipe Tomaz
how to save the information using the form FormWizard? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-user

FormWizard and FormPreview

2011-02-25 Thread Merijn
Hey Guys, I've got a problem with FormWizard and FormPreview and I need some the direction. First let me give you a quick view of the situation. What i'm looking for is a FormWizard with multiple steps and on the last step a FormPreview with all the data from the FromWizard. I think t

Re: Django FormWizard

2010-12-06 Thread Muhammed Abad
wrote: > Hi, > > Using the Django FormWizard, is it possible to generate a set forms > that work in an "edit" mode ? i.e. I have already saved some data > using the multiple step form, now I would like to edit this data. > > Any help would be appreciated. > > Thanks

Django FormWizard

2010-12-06 Thread Muhammed Abad
Hi, Using the Django FormWizard, is it possible to generate a set forms that work in an "edit" mode ? i.e. I have already saved some data using the multiple step form, now I would like to edit this data. Any help would be appreciated. Thanks -- You received this message becau

Re: FormWizard and permission_required

2010-11-03 Thread cootetom
iew(request): >   return MyWizard([Step1, Step2, Step3, ...]) > > On Nov 3, 9:54 am, cootetom wrote: > > > > > > > > > Hi, > > > When creating normal views I can decorate the view with > > @permission_required('some_permission') bu

Re: FormWizard and permission_required

2010-11-03 Thread ringemup
rmal views I can decorate the view with > @permission_required('some_permission') but when I'm using a > FormWizard class I don't know where to limit access to it based on > permissions? I have a FormWizard mapped to a URL: > > (r'^my_url/?$', Wizard([St

FormWizard and permission_required

2010-11-03 Thread cootetom
Hi, When creating normal views I can decorate the view with @permission_required('some_permission') but when I'm using a FormWizard class I don't know where to limit access to it based on permissions? I have a FormWizard mapped to a URL: (r'^my_url/?$', Wizard([S

CRUD with FormWizard

2010-09-17 Thread MarcoS
Hi! I've a Create-Read-Update-Delete application and some form with multiple pages created with FormWizard. How can i allow users to update data using a FormWizard? With singles forms I'm using generic_views, but I can't figure how to do this with FormWizards.. -- You receiv

Passing request.user to FormWizard?

2010-08-17 Thread Asinox
Hi guy's i want to know how pass request.user to my Form Wizard?, any idea? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Simple FormWizard wizard howto/example

2010-08-09 Thread PieterB
Hi, I'm still pretty new to django and searching some simple FormWizard examples What I want to do: First step: ModelChoiceField is populated with queryset Second step: A ChoiceField needs to be populated with object.get(model__field__exact=resultfromstep1)' In the last step I wa

FormWizard

2010-07-08 Thread rupert
Can you register a formwizard app in the admin tool for editing? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to dj

Re: FormWizard and fields which allow only one validation

2010-05-23 Thread barbuza
Supercaptcha removes it's hash and text code from cache to prevent using same hash and code many times. If you really need to use it with formwizard - you'll have to invent mechanism which will prevent supercaptcha from cleaning cache and clean it manually after all forms are validate

FormWizard and fields which allow only one validation

2010-05-17 Thread Valentin Golev
Hello! I've been using SuperCaptcha for Django for some time and everything was OK. But one day I was stupid enough and tried to use it with FormWizard. I think it's a bug and I could not invent a workaround for it (except for not using the FormWizard). The problem is, FormWizard valid

Using the FormWizard with models

2010-05-05 Thread Wiiboy
Hi guys, Another question about the FormWizard: is it possible to provide an existing instance of a model for the forms in the wizard? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: problems with FormWizard

2010-04-16 Thread Massimiliano della Rovere
(so it is one form per > guest) > - inserts the form2 'rendered' with the details of the selected events. > > When the last page should be displayed (by the done method of > FormWizard) I receive the following error: > Step 2 does not exist > > I suppose that the op

Re: problems with FormWizard

2010-04-16 Thread Massimiliano della Rovere
: - deletes form2, - inserts forms to enter data about each guest (so it is one form per guest) - inserts the form2 'rendered' with the details of the selected events. When the last page should be displayed (by the done method of FormWizard) I receive the following error: Step 2 does not exist

problems with FormWizard

2010-04-16 Thread Massimiliano della Rovere
ils of the selected events. When the last page should be displayed (by the done method of FormWizard) I receive the following error: Step 2 does not exist I suppose that the operations I do on FormWizard.form_list are not allowed. Also it seems that the step variable from the FormWizard.pr

Re: Django FormWizard Dynamically Alter form_list

2010-02-02 Thread David Durham
t need > 5, 7, or 8. > > The issue is that when 2 people hit the formwizard at the same time, > they start to see each others questions and answers. I guess I don't > understand how process_step suggests I can dynamically alter the > form_list, when by doing so I'm modi

Re: Django FormWizard Dynamically Alter form_list

2010-02-02 Thread leveille
o "instantiate the wizard in a > view function". Thanks for the message Paddy. I didn't get to the bottom of my issue either. I did move the FormWizard instantiation to a view, however it did not correct the issue I was having. In retrospect, what I was trying to accomplish (a dy

Re: Django FormWizard Dynamically Alter form_list

2010-02-02 Thread Paddy Joy
the form.  One person might hit the > form and need a dynamic form_list of 6 forms, and another might need > 5, 7, or 8. > > The issue is that when 2 people hit the formwizard at the same time, > they start to see each others questions and answers. I guess I don't > understand how

Django FormWizard Dynamically Alter form_list

2010-01-30 Thread leveille
pending contain questions and potential answers: http://dpaste.com/hold/152201/, specific to whoever is hitting the form. One person might hit the form and need a dynamic form_list of 6 forms, and another might need 5, 7, or 8. The issue is that when 2 people hit the formwizard at the same tim

Re: Initial values for formwizard form

2009-12-02 Thread geraldcor
am, geraldcor wrote: > > > > > Ok, > > > > > Here is how I do it if I am using a regularformwith a regular view: > > > > > profile = request.user.get_profile() > > > >form= MyForm('company': profile.defaultcompany, 'contact

Re: Initial values for formwizard form

2009-12-02 Thread geraldcor
return render_to_response('forms/submit.html', {'form':form}, > > > context_instance=RequestContext(request)) > > > > pretty simple and basic. > > > > How do I do this with aformwizard? > > > > Greg > > > > On Nov 17

Pass URL variable to formwizard like a normal form in views.py

2009-12-01 Thread geraldcor
No normally I can use something lie /foo/edit/35/ and I can edit the record whose pk is 35. Now with this, I have a url pattern like (r'^edit/(?P\d+)/$', 'edit'), which points to def edit (request, ssf_id): in my views.py. For my formwizard, by overriding various methods I ha

Re: Initial values for formwizard form

2009-11-19 Thread geraldcor
t; > Hello all, > > > > I began making aformthat used request.user.get_profile to get > > > default values for company name, phone, email etc. I have since > > > decided to move to a formwizard to split things up. I have no idea how > > > to override methods

Re: Initial values for formwizard form

2009-11-18 Thread Mark L.
lo all, > > > I began making a form that used request.user.get_profile to get > > default values for company name, phone, email etc. I have since > > decided to move to a formwizard to split things up. I have no idea how > > to override methods for the formwizard class

Re: Initial values for formwizard form

2009-11-18 Thread geraldcor
hone, email etc. I have since > decided to move to a formwizard to split things up. I have no idea how > to override methods for the formwizard class to be able to include > those initial values in the form. Can someone please help me with this > problem or point me to the proper help? I have com

Initial values for formwizard form

2009-11-17 Thread geraldcor
Hello all, I began making a form that used request.user.get_profile to get default values for company name, phone, email etc. I have since decided to move to a formwizard to split things up. I have no idea how to override methods for the formwizard class to be able to include those initial values

Re: Can I stop the FormWizard sequence?

2009-11-17 Thread Lacrima
I think you should override FormWizard.process_step() method, where you can make with the list of forms whatever you want. On Nov 17, 12:13 am, konatufe wrote: > Hi Guys! > > Can I stop the forms sequence in a Form Wizard? > Doing something like execute an extra function that return a Http > resp

Can I stop the FormWizard sequence?

2009-11-16 Thread konatufe
Hi Guys! Can I stop the forms sequence in a Form Wizard? Doing something like execute an extra function that return a Http response. Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django

Re: Keeping state in the FormWizard: instance attributes considered harmful?

2009-11-07 Thread Mark L.
On Nov 6, 5:36 pm, txranger wrote: > yes this is very similiar to what I am working on right now. Being a > newbie it seems much harder than it should be. I ended up setting a > state variable within self.extra_context. It is set by overriding the > process_step function in th

Keeping state in the FormWizard: instance attributes considered harmful?

2009-11-03 Thread Mark L.
Since FormWizard is instantiated only once (in the urlconf, as proposed in the documentation), no assumptions can be made about the integrity and validity of its instance methods/attributes. It is very easy to run into a situation, when self.form_list is altered and not restored to a value, with

Re: Formwizard and customizing the template layout

2009-11-02 Thread Mark L.
> Is there any way to have individual templates for each form To define, which template should be used for which step, you can override the get_template(self, step) method of the wizard (it must return the name of the template), that way you can use separate templates for certain steps (step numb

Formwizard and customizing the template layout

2009-11-02 Thread txranger
I am implementing a nine part questionnaire that is dynamic. By dynamic I mean the user may answer Part 1 and Part 2 but based on the answers to Part 2 may be directed to Part 8 then Part 9. I have that figured out but I need to have little more control over the look and feel of the each form. Th

Re: FormWizard Passing Data between forms

2009-10-13 Thread valhalla
): self.extra_param = extra_param super(MyForm, self).__init__(*args, **kwargs) def clean(self): # access your extra param with self.extra_param class TestFormWizard(FormWizard): extra_param = {} def get_form(self, step, data=None): """Override the

Re: FormWizard Passing Data between forms

2009-10-13 Thread nabucosound
gure out a pythonic way of passing data between the > forms of a formwizard. > I can do it with inital data but I need to access the data in the > clean method of the form. > > The only ways I can get working are really messy and wont scale > easily. >

FormWizard Passing Data between forms

2009-10-12 Thread valhalla
I am trying to figure out a pythonic way of passing data between the forms of a formwizard. I can do it with inital data but I need to access the data in the clean method of the form. The only ways I can get working are really messy and wont scale easily. Any suggestions out there

Re: FormWizard Validation via external data.

2009-10-11 Thread va1ha11a
OK Well I think I might have got a working outcome, however it involves a bit more overriding than I would like but here it is: Comments or suggestions are still most welcome. class TestFormWizard(FormWizard): def get_template(self, step): return 'dev/testwiz.html'

FormWizard Validation via external data.

2009-10-11 Thread va1ha11a
I am going crazy trying to figure out how to do a specific validation setup via FormWizard. Basically I have a bunch of forms that need regular validation but also get validated as part of the program flow. e.g: First form: enter group name -> validate by checking that group does not exist

Re: How do I require login before accessing FormWizard forms?

2009-10-02 Thread Anıl KARADAĞ
red.html', ctx) > On 2 окт, 18:11, JimR wrote: > >> After much searching, I found the answer that I was looking for - >> using the login_required decorator directly in the URLconf, then >> adding a subclass of __name__ to the FormWizard class. >> >> (r'

Re: How do I require login before accessing FormWizard forms?

2009-10-02 Thread kmike
orator directly in the URLconf, then > adding a subclass of __name__ to the FormWizard class. > >  (r'^contact/$', login_required(ContactFormWizard([ContactFormPartOne, > ContactFormPartTwo]))) > > but since it complains it can't find the __name__ attribute since it'

Re: How do I require login before accessing FormWizard forms?

2009-10-02 Thread JimR
After much searching, I found the answer that I was looking for - using the login_required decorator directly in the URLconf, then adding a subclass of __name__ to the FormWizard class. (r'^contact/$', login_required(ContactFormWizard([ContactFormPartOne, ContactFormPartTwo]))) bu

How do I require login before accessing FormWizard forms?

2009-09-30 Thread JimR
OK, so I've searched the group and the Internet looking for the answer to this questions, and the common answer seems to be "wrap the formwizard in a view." But I don't see any examples of how to do this. I currently have the formwizard embedded in the URLconf, and my atte

Re: FormWizard and form data

2009-09-24 Thread nostradamnit
I figured it out - you just have to overload the FormWizard method parse_params, like so... class CreateThingWizard(FormWizard): def parse_params(self, request, *args, **kwargs): current_step = self.determine_step(request, *args, **kwargs) if request.method == 'GET

Re: FormWizard and form data

2009-09-23 Thread Brian McKeever
but I haven't tried it. On Sep 18, 3:45 am, nostradamnit wrote: > I'm trying to use a FormWizard for a 2 step form. In the first form, I > want to populate the email and post code fields with data from the > current user (request.user.email, request.user.profile.code_postal), >

FormWizard and form data

2009-09-18 Thread nostradamnit
I'm trying to use a FormWizard for a 2 step form. In the first form, I want to populate the email and post code fields with data from the current user (request.user.email, request.user.profile.code_postal), but I can't see how to pass the data dictionary to the form?!? I see how to pa

Re: Formwizard dropdown lists

2009-09-16 Thread Karen Tracey
On Tue, Sep 15, 2009 at 11:45 PM, dingue fever wrote: > > Hi, > > I have modelform that I use in a formwizard and I populate a few of > the dropdown selects by accessing the database and creating a list for > the choice. However when I add an item to a table via the admin site

Formwizard dropdown lists

2009-09-15 Thread dingue fever
Hi, I have modelform that I use in a formwizard and I populate a few of the dropdown selects by accessing the database and creating a list for the choice. However when I add an item to a table via the admin site and then goto my formwizard page the new item does not show up in the list until I

Re: FormWizard: how to pass in extra keyword arguments into a form's __init__?

2009-09-01 Thread Alex Robbins
are stuck on 2.4. That doesn't help if you need the kwarg to come at run time though. [1] http://docs.python.org/library/functools.html#functools.partial On Aug 31, 4:41 am, Berco Beute wrote: > One of the forms I'm using in a FormWizard takes an aditional keyword > argument in i

FormWizard: how to pass in extra keyword arguments into a form's __init__?

2009-08-31 Thread Berco Beute
One of the forms I'm using in a FormWizard takes an aditional keyword argument in its __init__, e.g.: = def __init__(self, arg1=None, *args, **kwargs): pass = I'm at a loss how to make FormWizard construct my form while passing in the extra keyword argu

Re: Dynaically fields to a formwizard form

2009-08-27 Thread dingue fever
he form >         form.is_bound = True >         form.data = request.POST >         if form.is_valid(): >     return render(request, 'my_template.html', locals()) > >             cool! > On Aug 25, 7:16 am, dingue fever wrote: > > > Hi, > > > Is it possib

Re: Dynaically fields to a formwizard form

2009-08-25 Thread Peter Bengtsson
25, 7:16 am, dingue fever wrote: > Hi, > > Is it possible to dynamically add fields to a formwizard form. I have > been able to add the fields I want but if the form fails validation > the new dynamic fields disappear when the form re-renders. Is it > possible to override this so tha

Dynaically fields to a formwizard form

2009-08-24 Thread dingue fever
Hi, Is it possible to dynamically add fields to a formwizard form. I have been able to add the fields I want but if the form fails validation the new dynamic fields disappear when the form re-renders. Is it possible to override this so that I can validate and return the new fields if the

  1   2   >