» Django – How to get the length of the array through GET request?
Django – How to get the length of the array through GET request?
|September 29, 2014
Posted by forumadmin
I have a http get request that has an array, particularly:
[29/Sep/2014 16:04:47] "GET /webapp/ajax_retreiveServerSideUsernames/?draw=1&columns%5B0%5D%5Bdata%5D=0&columns%5B0%5D%5
h%5Bvalue%5D=&search%5Bregex%5D=false&csrfmiddlewaretoken=Something&_=1412028280135 HTTP/1.1" 200
My question is that how do I get the “length” of a particular array in a GET request?
For example the array order:
However, there may be cases with unkown array size.
If I know that i = 0, then I can use
request.get['order[column]'] to get the content of the first array’s column data.
I tried to use
request.GET.getlist('order') with no avail.
More Related Questions
- How do I get the content length of a Django response object? In Django, I try to logging the request and response content length, which exactly the same as what Django server prints to stderr.
[05/Apr/2011 22:59:08] "GET /pages/ HTTP/1.1" 200 […]
- Prevent Django from blocking while proxying an HTTP request I'm working on a Django site that allows connecting to devices in restricted networks through a cloud service. The devices connect to a cloud server through a VPN or SSH tunnel and clients […]
- Should unrecoverable exceptions from HTTP parameter problems be caught? Is it necessary to catch errors stemming from HTTP inputs? Is it ever a good idea to let it fail naturally (allow the exception to bubble up)?
I have a Django view for a server side […]
- Why does Django serve my page as a download? I have a Web app written in Python+Django. On my machine, it works fine; as soon as I push it into production, it starts acting up.
For some reason, my login screen loads fine. But, as […]
- problems with ldap authentication in django I'm need your helps in my project.
I have site with login from ldap server, i'm do this, and in my local machine it's working, working as well but slowly, so first question why login so […]
- Conditional Response Assertion in JMeter I have a requirement wherein a server can send 200 OK or 409 conflict for a given GET/PUT/DELETE request to a resource. Based on the situation and context at that point of time, server can […]
- Android: How to receive an http response in a new activity? easy question: How do I receive a response (in my case send with Volley) in another activity?
MainActivity -> send request -> start new activity => NewActivity -> receive response
(I am […]
- Including created resource in HTTP POST response? RFC7231 says a server should respond to a resource-creating POST request with status 201 and a Location header to the new resource. In some situations it could be convenient for the server […]
- what is relation between content-length and byte ranges in HTTP/1.1? I am not grasping the idea behind content-length and byte ranges as specified by HTTP 1.1
Is there are connection between the two of some sort? If a client requests in terms of byte […]
- Getting Http Status code number (200, 301, 404, etc.) from HttpWebRequest and HttpWebResponse I am trying to get the HTTP status code number from the HttpWebResponse object returned from a HttpWebRequest. I was hoping to get the actual numbers (200, 301,302, 404, etc.) rather […]