Re: Parsing the arguments in HTTP GET

2009-05-19 Thread Andrew Ingram
I've used the forms framework with GET (I'm using it for a search form and a 'q' parameter), but it never occurred to me to use it to validate non-form parameters. Thanks! - Andrew Ingram 2009/5/19 Russell Keith-Magee : > > On Tue, May 19, 2009 at 10:38 PM, Andrew Ingram wrote: >> >> This is t

Re: Parsing the arguments in HTTP GET

2009-05-19 Thread Russell Keith-Magee
On Tue, May 19, 2009 at 10:38 PM, Andrew Ingram wrote: > > 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. You mean, something like the Forms framework? :-) Ordin

Re: Parsing the arguments in HTTP GET

2009-05-19 Thread Andrew Ingram
27; in request.GET: >    ui=request.GET['ui'] > > or you can default it by doing: >  ui=request.GET.get('ui','defaultvalue') > > > W > > -Original Message- > From: django-users@googlegroups.com > [mailto:django-us...@googlegroups.com

RE: Parsing the arguments in HTTP GET

2009-05-19 Thread Will Matos
f 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

Re: Parsing the arguments in HTTP GET

2009-05-16 Thread Michael
> > On 15 May 2009, at 23:56, MohanParthasarathy wrote: > > > > > 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=/fetch > > > > From what I c

Re: Parsing the arguments in HTTP GET

2009-05-16 Thread Vladimir Prudnikov
Do you want it to simply parse, or you want to add it into urlconf? If you want to just parse - use urlparse module http://docs.python.org/library/urlparse.html if you want to add it into the url config - simply handle 'data/' and the rest data you will get from GET data through request.GET d

Re: Parsing the arguments in HTTP GET

2009-05-15 Thread Mohan Parthasarathy
On Fri, May 15, 2009 at 3:58 PM, Antoni Aloy wrote: > > 2009/5/15 MohanParthasarathy : > > > > 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=x

Re: Parsing the arguments in HTTP GET

2009-05-15 Thread Mohan Parthasarathy
On Fri, May 15, 2009 at 4:39 PM, Tom Evans wrote: > > On Fri, 2009-05-15 at 14:56 -0700, MohanParthasarathy wrote: > > 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/?

Re: Parsing the arguments in HTTP GET

2009-05-15 Thread Tom Evans
On Fri, 2009-05-15 at 14:56 -0700, MohanParthasarathy wrote: > 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=/fetch > > From what I can tell, i ca

Re: Parsing the arguments in HTTP GET

2009-05-15 Thread Antoni Aloy
2009/5/15 MohanParthasarathy : > > 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=/fetch > > From what I can tell, i can't match the whole thing using

Parsing the arguments in HTTP GET

2009-05-15 Thread MohanParthasarathy
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=/fetch >From what I can tell, i can't match the whole thing using the url pattern. I can parse up till "http:/