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