Answer the question
In order to leave comments, you need to log in
How to wait for a request to another url in Django?
Hello. Tell me with what you can wait for a response to another URL?
Example:
I am on the main page (index), I enter something into the form. POST request is sent to another server. At this moment:
- another server processes the data and, depending on its correctness, makes a POST request to my url /answer (True or False).
- let me redirect to another page another.
How to write the logic of another page (another) so that Django waits for a POST request from another server to /answer and, depending on this True / False request, I display everything OK or everything Bad on this page?
Answer the question
In order to leave comments, you need to log in
It is not very clear why the server side is involved here.
If I understand correctly, it is enough to send xmlHttprequest to a third-party server using JS, you get a response with it, and then again redirect to the desired url with JS.
If necessary, you can also send a request to your server to save the data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question