fix: login redirection

wip-payments
Aravinth Manivannan 2022-06-18 20:02:54 +05:30
parent ca8bb56d6c
commit 1e7d45d53b
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
2 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,8 @@
/>
</label>
<input type="hidden" name="next" value="{{ next }}">
<label class="form__label" for="password">
Password
<input

View File

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