Re: Passing parameters via POST in django 1.5
They are not in the url, but in the body. I saw this now:
Changed in Django 1.5:
This means I have to put this in the header:Before Django 1.5, HttpRequest.POST contained non-form data.
ContentType: application/x-www-form-urlencoded
Seems that jquery does this for you when you serialize a form, but not otherwise.
Thanks anyway!
kl. 16:10:58 UTC+2 onsdag 19. juni 2013 skrev Anderson Borges følgende:
--if the parameters are in the URL the correct is request.GET
https://docs.djangoproject.com/en/dev/ref/request- response/ On Wed, Jun 19, 2013 at 8:09 AM, o_r <odd.h...@smartm.no> wrote:Hi,
We're upgrading our application from 1.3 to 1.5. We have quite a few rest apis in our application. This used to work in 1.3:
Url:
/path/to/api
Passing parameters in the body like this:
&someParamter=someValue&otherParameter=otherValue
but it doesn't in 1.5, request.POST is empty in the view. I've tried both via a restclient and javascript. I can't find any documentation that this has changed, so what am I missing?
Thanks!
Odd-R.
--
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...@googlegroups.com .
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users .
For more options, visit https://groups.google.com/groups/opt_out .
--
Anderson Dias Borges
Senior Analyst Developer
Tu cumprirás o desejo do meu coração se eu Te buscar...
I can't see but I'll take my chances
To hear You call my name
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.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home