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

Re: Using create_object generic view excluding

2009-08-09 Thread Lacrima
Sorry, I have missed some words in the topic name, but I can't change it now. ( On Aug 9, 8:54 pm, Lacrima <lacrima.ma...@gmail.com> wrote: > Hello! > > I want to use django.views.generic.create_update.create_object to > create and save object. > But I need one field to be e

Using create_object generic view excluding

2009-08-09 Thread Lacrima
Hello! I want to use django.views.generic.create_update.create_object to create and save object. But I need one field to be excluded from the form displayed. I can do it by setting exclude = ('somefield',) in the Meta class of my ModelForm subclass. If so I can't submit this form without an

Re: Sending POST data and Redirecting to external website from a view

2009-05-30 Thread Lacrima
Hello! This is impossible to redirect a user to external site with post. urllib and urllib2 can only help to fetch data, but not to redirect a user. So if you do not use ssl, you have to use hidden fields where you should specify id and pin. You can make payments much secure using hash

Re: "Conditional fields" in forms

2009-05-29 Thread Lacrima
This article will help a lot: http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/ The simplest way is just to override __init__ method of your Form class. For example, you need to show to user additional fields, depending on previous choices. class MyFirstForm(forms.Form): choices =

Re: Dynamic form validation doesn't work.

2009-04-30 Thread Lacrima
Thank you very much, Daniel!!! Max. On Apr 30, 8:41 pm, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Apr 30, 5:43 pm, Lacrima <lacrima.ma...@gmail.com> wrote: > > > > > Hello! > > > For example I have: > > class ContactForm(forms

Dynamic form validation doesn't work.

2009-04-30 Thread Lacrima
Hello! For example I have: class ContactForm(forms.Form): def __init__(self, foo, *args, **kwargs): super(ContactForm, self).__init__(*args, **kwargs) self.fields['subject'] = forms.CharField() self.fields['message'] = forms.CharField() self.fields['sender'] =