Re: How do I correctly format a Querydict derived list in a url?

2009-02-02 Thread Thomas Guettler
Alfonso schrieb: > Thanks Alex, > > I tried that but no joy - the problem is I just can't get django to > nicely capture the list's values - it's really stumped me! > > location_filter = request.POST.getlist("location") does give me a > python list of location variables. But I can't get this

Re: How do I correctly format a Querydict derived list in a url?

2009-01-31 Thread NoviceSortOf
> > > myurl.com/activities/[u'ireland', > > > u'nireland']/: what I really want > > > is: > > > > /activities/ireland-nireland/ > I'm not sure if any of this is the 'correct' way but it likely will work. Try a combination of python's eval() and str()

Re: How do I correctly format a Querydict derived list in a url?

2009-01-30 Thread Alfonso
Thanks Alex, I tried that but no joy - the problem is I just can't get django to nicely capture the list's values - it's really stumped me! location_filter = request.POST.getlist("location") does give me a python list of location variables. But I can't get this resultant [u'ireland',

Re: How do I correctly format a Querydict derived list in a url?

2009-01-30 Thread Alex Koshelev
Try this: return HttpResponseRedirect('/activities/%s/' % "-".join(location_filter)) On Fri, Jan 30, 2009 at 10:26 PM, Alfonso wrote: > > I've got a form delivering multiple variables from a checkbox group > via POST to a view that defines where to redirect to. > >

How do I correctly format a Querydict derived list in a url?

2009-01-30 Thread Alfonso
I've got a form delivering multiple variables from a checkbox group via POST to a view that defines where to redirect to. I've got django to pass the values of this Querydict to a redirect response but can't change the formatting: In my view: location_filter = request.POST.getlist("location")