From 3efb06ce1389df12696c3d2b47a5e8f38669dce0 Mon Sep 17 00:00:00 2001 From: Maja Frydrychowicz Date: Mon, 2 Jun 2014 22:02:22 -0400 Subject: [PATCH] Fix how URL with query string is formed. dict() applied to QueryDict produces a dictionary whose values are string representations of lists, like "[u'44']". This is because QueryDict associates each key with a list of values even if there is only one value. QueryDict's dict() method translates each list of values into a string repr of *one* value from the original list. This means data is thrown away for any keys with multiple values in the QueryDict. This is a problem for certain form controls. --- oneanddone/tasks/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oneanddone/tasks/helpers.py b/oneanddone/tasks/helpers.py index 0f5ac701..83f58755 100644 --- a/oneanddone/tasks/helpers.py +++ b/oneanddone/tasks/helpers.py @@ -4,6 +4,6 @@ @register.function def page_url(request, page): - params = dict(request.GET) + params = request.GET.dict() params['page'] = page return urlparams('', **params)