I think an example may illustrate what I mean a little better.

Having a view with an url like the following:
http://domain.com/objects/123/rels/?name=zyx&type=xyz

Considering this same view produces hyperlinks (to be sent to it's
template) that add extra query parameters to it's URL, like for
example:
http://domain.com/objects/123/rels/?name=zyx&type=xyz&page=2

Is there a simpler way to achieve this than reading the parsed
parameters from the "request" object, reconstructing the original URL,
and finally adding the extra parameter?

thanks,
Filipe


On Aug 2, 12:20 pm, Filipe Correia <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm struggling with an issue similar to the one presented on this
> thread:http://groups.google.com/group/django-users/browse_frm/thread/536c0a7...
>
> In a view, getting the various elements that compose the current URL's
> query string is easy, one only needs to use the "request" object:
>
> request.GET['name']
>
> however, in my case I would like to preserve the current querystring,
> whichever it is, replacing (or adding) only the value for a certain
> variable (say, the value for "page"). So I would be reading the parsed
> query string only to compose it again with very little change.
>
> Is there a more elegant way to do this?
>
> thanks in advance,
> Filipe Correia


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to