Add support for sign up redirection

This commit is contained in:
modulos 2017-05-23 19:18:51 +02:00
parent 88731d6371
commit 15259e59f2
2 changed files with 3 additions and 1 deletions

View file

@ -38,6 +38,8 @@
{% trans "Login"%}
</button>
{% endbuttons %}
<input type='hidden' name='next' value='{{request.GET.next}}'/>
</form>
<span>{% trans "Don't have an account yet ? "%}<a class="unlink" href="{% url 'hosting:signup' %}">{% trans "Sign up"%}</a></span>
<br/>

View file

@ -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):