Looks like my models are working. (YAY!) My save routine failed
though, but I finally figured it out. So the done() function looks
like this now:
def done(self, request, form_list):
o = PurchaseApplication()
for form in form_list:
form.instance = o
form.save(commit=False)
o
It looks like these ModelForms are going to work well for me. I have
a lot less code now. I actually created 2 other classes to help out
with the field ordering. I haven't tested these yet...
class OrderedForm(ModelForm):
def __init__(self, ordered_fields, *args, **kwargs):
super(O
1. yes by overlriding the init
class myForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(myForm, self).__init__(*args, **kwargs)
self.fields.keyOrder = ['foo', 'bar',...]
2. in the same way you could use
self.fields['foo'].label = self.fields['foo'].help_text
On Aug
So by using a combination of fields and exclude in the Meta class, I
can choose what fields I want for that form. Nice! :)
Two questions though:
1. Will fields be presented in the order specified in the fields
tuple?
2. In my original model/form diagram, will there be a way for me to
use th
Ah, so I guess ModelForm will work with the FormWizard? I'll have to
look through that documentation. Reading documentation is easier than
pulling my hair out! =)
Thanks Rajesh.
On Aug 22, 4:14 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Hi Keith,
>
>
>
> > I'm using the form wizard for a
Hi Keith,
> I'm using the form wizard for a project. All the field names in
> models.py coincide with the field names in forms.py. There is ONE
> field that is consistently, yet sporadically, causing problems and I
> cannot see why.
>
> # models.py
> class PurchaseApplication(BasicApplication):
I'm using the form wizard for a project. All the field names in
models.py coincide with the field names in forms.py. There is ONE
field that is consistently, yet sporadically, causing problems and I
cannot see why.
# models.py
class PurchaseApplication(BasicApplication):
down_payment_assets
I'm experiencing some strange behavior with the Form Wizard. During
testing, sometimes I'll get to the last step, click Finish, and I'll
get another form with no fields and finish button turns back into a
next button.
Its set up like this:
# urls.py
(r'^application/$', MyWizard([Appl1, Appl2, D
8 matches
Mail list logo