dimanche 7 février 2016

ways to process a post request in django view and re-send it to another view

i am new to django, i have a view that recieves a post request from html form, and i like to do some process and then send another post request to another view with some of the original data, and some more data that i add to it,

i read that http does not allow to pass the same post request you received.

i read the official documentation and don't find a way of doing so, and i read about the library requests, and when i tried using it and then send the request i made by httpresponseredirect, it keeps sending it as post by writing tons of things in the address bar, and it kind of looks like it tries to use get instead of post.

i found here this question:

[a link] (Which function in django creates a HttpRequest instance and hands to a view?)

[a link] (Simulating a POST request in Django)

but i don't understand from it how can i create a request in an efficient way, from my django app, and send it to another view of even another app.

thanks!




Aucun commentaire:

Enregistrer un commentaire