Fixed redirect signup error. Fixed login next url error
This commit is contained in:
parent
eaf1f1de86
commit
05a165095d
2 changed files with 5 additions and 2 deletions
|
@ -49,7 +49,7 @@
|
|||
<br>
|
||||
<div class="notice-box">
|
||||
<p class="signup-text">Forgot password?<a href="{% url 'digitalglarus:reset_password' %}">Find ID/Password</a></p>
|
||||
<p class="signup-text">Not a member yet?<a href="{% url 'digitalglarus:signup' %}">Sign up </a>now.</p>
|
||||
<p class="signup-text">Not a member yet?<a href="{% url 'digitalglarus:signup' %}?{{request.GET.next}}">Sign up </a>now.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,10 @@ class SignupViewMixin(CreateView):
|
|||
success_url = None
|
||||
|
||||
def get_success_url(self):
|
||||
next_url = self.request.POST.get('next', self.success_url)
|
||||
|
||||
next_url = self.request.POST.get('next') if self.request.POST.get('next')\
|
||||
else self.success_url
|
||||
|
||||
return next_url
|
||||
|
||||
def form_valid(self, form):
|
||||
|
|
Loading…
Reference in a new issue