Django Wizard - custom queryset depending of the previous step

28 views
Skip to first unread message

Solvik

unread,
May 9, 2012, 4:29:14 PM5/9/12
to django...@googlegroups.com
Hi everyone,

It's the first time I post here as I've always search everything before posting, but this time I'm losing my head :)

I'm using for the first time the django Wizard Form feature. It looks awesome !

As I need to change the queryset depending of the result of the previous form step I rewrite the ``get_form`` method.

The problem:
When I reach the step3, wheter using the non-commented code or the commented one, the code processes for minutes until the development server close the connection.
Any idea ?

Hints:
- I think the code processes the ``ModulePort.objects.all()`` of the queryset form attribute. And since I have like 12k entries in my database it takes time ? I already have this problem on other forms of my application: the render of the HTML select widget takes a lot of time depending of the amount of entries.

Other questions:
Is there another way to do what I am doing ?

Thanks in advance for any pieces of advice you can give me :)

Regards,

Solvik.


Reply all
Reply to author
Forward
0 new messages