Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 6, 2010 12:19:23

Muhammed A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django FormWizard


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 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
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 6, 2010 13:40:33

Muhammed A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django FormWizard


Managed to figure this out in the end:

def add_edit(request, id=None):
if id:
obj = get_object_or_404(Book, id=id)
return ResidentialListingWizard()(request, instance=obj)
else:
return ResidentialListingWizard()(request)

Once all my forms have been filled in, I guess the saving of the data
will be handled by my done() method. However, i did notice that in the
multi step forms, the names and id's of elements are named according
to the step index. for example, the "author" field in a normal django
form would have an id of 'id_author', but in the multistep form, if
the field is on the first step, the id is now 'id_0-author'. Can i
still save my data without modifying my field names in my model?

On Dec 6, 12:40 pm, Muhammed Abad <muhammeda...@gmail.com> 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

--
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
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 17th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support