Commit 3621a059 authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Updating the redirection of the webapp creation

The redirection of the webapp creation now redirects to the webapp
sandbox creation page instead of the user webapp list.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <>
parent 40da9c2d
Pipeline #31167 failed with stage
in 7 minutes and 13 seconds
......@@ -269,7 +269,7 @@ class WebappCreate(SuccessMessageMixin, LoginRequiredMixin, GroupRequiredMixin,
def get_success_url(self):
"""If successful redirect to the webapp list page"""
return reverse('main:user_webapp_list', args=(self.request.user,))
return reverse('main:webapp_sandbox_creation', args=(self.webapp.docker_name,))
def form_valid(self, form):
"""Save data coming from the form in the database """
......@@ -285,7 +285,10 @@ class WebappCreate(SuccessMessageMixin, LoginRequiredMixin, GroupRequiredMixin,
# set up the docker container for the app
Quota.objects.create(user=self.request.user, webapp=obj)
return super(WebappCreate, self).form_valid(form)
# pass on the webapp data to get_successful_url to redirect with the
# correct arguments (for instance the docker_name)
self.webapp = obj
return super().form_valid(form)
class WebappSandboxCreation(SuccessMessageMixin, LoginRequiredMixin, CreateView):
Supports Markdown
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