bug? cannot urlencode() after storing QueryDict in session

13 views
Skip to first unread message

Konstantin Sushenko

unread,
Aug 15, 2011, 12:25:39 AM8/15/11
to Django users
hello,

I store request.GET in session:

request.session['query_string'] = request.GET

then I retrieve the value in another page and try to urlencode the
QueryDict:

context['query_string'] = request.session['query_string'].urlencode()

in my context I get the python's string representation of the
QueryDict object instead of the expected key0=value0&key1=value1&...
string.

If, instead of QueryDict, I store the urlencoded string in the
session, everything works of course:

request.session['query_string'] = request.GET.urlencode()

a bug?

thanks

konstantin
Reply all
Reply to author
Forward
0 new messages