This is the only real way to do this with Django, though I do wish
there was a core Django way to validate GET params, ie which ones are
allowed and what format they should be.

- Andrew Ingram

2009/5/19 Will Matos <[email protected]>:
>
> You wouldn't match this using a url pattern.  The rest of the query
> string will be in the request.GET list.  So you can do the following:
>
> ui=request.GET['ui']
> shva=request.GET['shva']
> name=request.GET['name']
>
> you'll probably want to check that it exists first by doing:
>  if 'ui' in request.GET:
>    ui=request.GET['ui']
>
> or you can default it by doing:
>  ui=request.GET.get('ui','defaultvalue')
>
>
> W
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of MohanParthasarathy
> Sent: Friday, May 15, 2009 5:56 PM
> To: Django users
> Subject: Parsing the arguments in HTTP GET
>
>
> Hi,
>
> I am very new to django. I am following along the tutorial. But I want
> to be able to parse the URL which has the following form:
>
> http://example.com/data/?ui=2&shva=1#label&name=xxxx/fetch
>
> From what I can tell, i can't match the whole thing using the url
> pattern. I can parse up till "http://example.com/data"; and the rest in
> the code. Where can i find examples/tutorials for the above format ?
>
>
> thanks
> mohan
>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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