From 15259e59f2fff6e0b9841bc1efd606dd5158099a Mon Sep 17 00:00:00 2001 From: modulos Date: Tue, 23 May 2017 19:18:51 +0200 Subject: [PATCH] Add support for sign up redirection --- hosting/templates/hosting/login.html | 2 ++ utils/views.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hosting/templates/hosting/login.html b/hosting/templates/hosting/login.html index 2f1693ac..3f3a60b7 100644 --- a/hosting/templates/hosting/login.html +++ b/hosting/templates/hosting/login.html @@ -38,6 +38,8 @@ {% trans "Login"%} {% endbuttons %} + + {% trans "Don't have an account yet ? "%}{% trans "Sign up"%}
diff --git a/utils/views.py b/utils/views.py index e69bac1d..75506959 100644 --- a/utils/views.py +++ b/utils/views.py @@ -39,7 +39,7 @@ class LoginViewMixin(FormView): success_url = None def get_success_url(self): - next_url = self.request.session.get('next', self.success_url) + next_url = self.request.POST.get('next', self.success_url) return next_url def form_valid(self, form):