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