Commit 61b6395a authored by Joseph Nuthalapati's avatar Joseph Nuthalapati

install: Use Post/Response/Get pattern for reloads

Redirect the POST request for install with the template. This ensures that any
reload performed on the page will be a GET request.

https://en.wikipedia.org/wiki/Post/Redirect/GetSigned-off-by: Joseph Nuthalapati's avatarJoseph Nuthalapati <njoseph@thoughtworks.com>
parent 27488575
Pipeline #17268 passed with stages
in 12 minutes
......@@ -192,7 +192,10 @@ class SetupView(TemplateView):
# Give a moment for the setup process to start and show
# meaningful status.
time.sleep(1)
return self.render_to_response(self.get_context_data())
response = self.render_to_response(self.get_context_data())
# Post/Response/Get pattern for reloads
response.status_code = 303
return response
elif 'refresh-packages' in request.POST:
# Refresh apt package lists
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment