Tuesday, July 24, 2012

Re: json objects and PUT/GET Requests/Response

On 2012-07-24, at 21:09 , svs wrote:

> Hello,
>
> I am new to both DJANFGO & REST.
> Here is my problem,I have defined CRUD specific to that of MongoDB in my
> Models.py file, now I am trying to pass data to be written into this DB
> using http PUT requests.
> 1.How parse json objects in the body of HTTP request ?

https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.body

https://docs.djangoproject.com/en/dev/topics/serialization/ or http://docs.python.org/library/json.html

> 2.How to create HTTP put/get request for test purposes with json objects
> through CLI or GUI.

https://docs.djangoproject.com/en/dev/topics/testing/#making-requests
https://docs.djangoproject.com/en/dev/topics/testing/#django.test.client.Client.put
https://docs.djangoproject.com/en/dev/topics/testing/#django.test.client.Client.get

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment