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', u'nireland'] list to become iterable where I can just
drop the values into a HttpResponseRedirect url like /ireland-
nireland/

I think I am approaching this incorrectly - If I try request.POST
["location"]  It all works but only with the last item in the
QueryDict.

Hope I'm making sense, Thanks!

Allan



On Jan 30, 7:35 pm, Alex Koshelev <daeva...@gmail.com> wrote:
> Try this:
>
> return HttpResponseRedirect('/activities/%s/' %  "-".join(location_filter))
>
> On Fri, Jan 30, 2009 at 10:26 PM, Alfonso <allanhender...@gmail.com> wrote:
>
> > 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")
> > return HttpResponseRedirect('/activities/%s/' % location_filter)
>
> > And that gives me:
>
> > myurl.com/activities/[u'ireland<http://myurl.com/activities/%5Bu%27ireland>',
> > u'nireland']/: what I really want
> > is:
>
> > /activities/ireland-nireland/
>
> > Any help woukd be great - I've been staring at this far too long!
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to