fix: login redirection
parent
ca8bb56d6c
commit
1e7d45d53b
|
@ -21,6 +21,8 @@
|
|||
/>
|
||||
</label>
|
||||
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
|
||||
<label class="form__label" for="password">
|
||||
Password
|
||||
<input
|
||||
|
|
|
@ -59,7 +59,7 @@ def login_view(request):
|
|||
login(request, user)
|
||||
if "next" in request.POST:
|
||||
next_url = request.POST["next"]
|
||||
if next_url:
|
||||
if all([next_url, len(next_url) > 0]):
|
||||
return redirect(next_url)
|
||||
return redirect(reverse("accounts.home"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue