On Tue, 31 Jan 2006 02:00:53 +0200, Oliver Rutherfurd
<[EMAIL PROTECTED]> wrote:
Hi Amit,
On 1/30/06, Amit Upadhyay <[EMAIL PROTECTED]> wrote:
On 1/31/06, Oliver Rutherfurd <[EMAIL PROTECTED]> wrote:
> The use case for this is a long registration process, where different
> data points from individual models are split across multiple pages.
> The application needs to save data collected after every step, so the
> user doesn't have to start from scratch if they leave the site and
> return later. As a silly example, let's say that name is collected on
> page 1, phone # on page 2. Both are required and both live in a
> 'person' table -- and I want to save the model after page 1.
I would recommend creating your own FormManipulators, one for each page.
Validate page level manipulator and save the content in
request.session, and
when you are done on the last page, pick out all the saved temproary
states
and insert it in the database.
Thanks for the suggestion, but saving to the db after every page is a
requirement of the app. If someone fills out a page and comes back a
week, or even a year later, everything they previously entered should
be in the db.
Well put blank=True in model field descriptions, use custom
FormManipulators and save the data in database after each page :)
HTH,
Edgars Jekabsons