On 27 July 2016 at 02:02, Lee Hinde <[email protected]> wrote:
> To maintain state, after any ad-hoc query, I store the ids for the found 
> records:
>
> self.request.session['query.classes.last_ids'] = 
> list(queryset.values_list('id', flat=True))

add a new model: Previous_Searchs or something like this, with
metadata on the search (user, date, sort critera, etc) and a many2many
link to the found records.

it makes it easy to repeat a search, keep it for longer, name it, or
even share it


-- 
Javier

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFkDaoQ7_0jHOFdoPUL3G6GizWvFZub354Vjcog-LTb3ZKQ8-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to