Add support for sign up redirection
This commit is contained in:
parent
88731d6371
commit
15259e59f2
2 changed files with 3 additions and 1 deletions
|
@ -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/>
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue