Redirect new user to key generation view

This commit is contained in:
modulos 2017-05-25 16:23:31 +02:00
parent 4b89e71b1f
commit d395735219

View file

@ -188,10 +188,11 @@ class SignupView(CreateView):
template_name = 'hosting/signup.html' template_name = 'hosting/signup.html'
form_class = HostingUserSignupForm form_class = HostingUserSignupForm
model = CustomUser model = CustomUser
success_url = reverse_lazy('hosting:key_pair')
def get_success_url(self): def get_success_url(self):
next_url = self.request.session.get( next_url = self.request.session.get(
'next', reverse_lazy('hosting:virtual_machines')) 'next', self.success_url)
return next_url return next_url
def form_valid(self, form): def form_valid(self, form):