Wednesday, March 4, 2015

getting tuples from http request.GET

Hi Guys,

Pretty new to Django, but used it blindly and works wonders. But here is a situation I am blocked at now for a new project

I request.GET the following URL

https://mydesktop.com/validator?hostname1=host1.example.com,location1=ca,ip1=2.2.2.2,hostname2=host2.example.com,location2=wa,ip2=3.3.3.3

Am using request.GET I want to get the output in a tuple or hash form as:

[{host1.example.com:[ca,2.2.2.2]},{host2.example.com:[wa,3.3.3.3]}]



Once I have this data I can process it further.
Please help





--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a6bd8dad-23fa-43f4-a3b2-c6cc8efafc7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment