While it may look ugly, it's actually pretty effective - depending on what you want to enable with search queries overlaid on URL's. If you only had simple (i.e. one word) terms, you could write the query into the URL itself, but I found that using a url like /search/ and then appending on ?q=... and page=... was really about the most expedient path.
-joe On 6/4/07, Jiri Barton <[EMAIL PROTECTED]> wrote: > > What is the best way of adding query parameters (aka GET parameters) > to a URL? > > return HttpRedirect(reverse('animal-search') + '?q=%s&page=%d' % > (animal.name, current_page)) > > seems awkward to me (not to mention escaping the name). How can I > avoid creating query parameters manually? Or, should I avoid query > parameters altogether? It seems every page is using query parameters > in searches. > > And how should I create such URLs from within templates? > > Thank you, > Jiri > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---