views:

55

answers:

1

Hi all,

I found out that the FormWizard only __init__'s once, when the url is request by multiple users at the same time (me in 2 browsers :).

This results in the fact that my temporarily stored data on the wizard's instance is wrongfully shared between users.

I'm doing some DB hits in the second step, and based on that outcome I do a conditional wrap-up in the done() method. code/description: http://tinyurl.com/yf6tose

Anybody have some advise on how to handle this?

Thanx a lot

A: 

After redoing the code of my 2 wizards, the solution that uses a dict on the FormWizard's instance now uses a nested dict with the session id as the name for the nested dict.

Thus instead of:

self.wizdata

I now use:

sk = request.session._session_key
self.wizdata[sk]

Example and full detail here:

http://www.gerardjp.com/2010/02/24/django-formwizard-best-well-useful-practices/

Regards,

Gerard.

GerardJP