> When the user enterssearchtermsand submits the form it doesn't pass
> a queryset object to the view.  Your view gets called (with a GET or
> POST) and gets passed in arequestobject.  You grab the parameters
> out of that (preferably using the spiffy Django forms to help you
> handle validation) and then you create a queryset in your view method.

OK, I've now looked up some examples for that in the meantime, looks
pretty much straight-forward.

> But I see what you are asking, which is how to maintain an existing
> queryset across multiple views.  Seems like you could easily stash
> that away
> in the session data.  This is covered here:
>
> http://www.djangoproject.com/documentation/db-api/#pickling-querysets

Thanks for the pointer, I hadn't encountered this stuff before at all.

> Essentially, you don't pickle the actual QuerySet object, you pickle
> the "query" attribute of the QuerySet object.

Ah, OK.

I'm just asking myself now: doesn't a browser keep the same session
data for the same logged-in user?
I.e., if a user browses the site in two browser tabs of the same
browser, logs in in both, but places different searches on the site
between the browser tabs?

Would the browser in some way signal that the next request comes from
a different tab? I don't think so, but then again, I may not know
enough of web technologies.
Even so, I assume it would call for programming some sort of manager
to handle that (doesn't seem clean) - otherwise, searching first in
tab1 and then in tab2, and then again refining the search in tab1
would cause conflicting filtered results.


EE
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to