Is there a way in django to update the same page with the response without totally rendering it. I am trying to create a code editor to test. But when I am returning the results my contents are removed. I understand it is because I am rendering the page . I need the contents to retain. How can I do it using redirect? I am including the render statement I used and a screenshot of how it looks here:
Steps:
- Handle post request
- Program execution code
- Save the result in a variable called "message". Then I used
return render(request, 'editor.html', {'message': message})
I want to redirect the message to the same page without rendering a new page.
[Before submission][1] [After submission][2] [1]: https://i.stack.imgur.com/BxoLU.png [2]: https://i.stack.imgur.com/uiEOU.png
Any help will be appreciated. Thank you.