mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-15 09:51:21 +00:00
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/Get Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
27488575c7
commit
61b6395a1c
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user