On Mon, Aug 03, 2015 at 11:49:09AM -0400, felix wrote:
> El 03/08/15 09:42,
durir...@gmail.com escribió:
> >I'm in a point of my app where I've two GET params, *p* and *q*
> >(pagination and query search), and I think that the best method to
> >remember the params value when you change page is to use a string to
> >manually build up the params URL. Any ideas?
> >
> ListView might help or maybe its ancestor MultipleObjectMixin with its
> paginate_by attribute.
Or if you just want a good way to build up that query, I use QueryDict:
from django.http import QueryDict
qdict = QueryDict('', mutable=True)
qdict['p'] = my_page
qdict['q'] = my_query
my_new_url = "
http://example.com/my-view?%s" % qdict.urlencode()