-
+
Compte clipper
-
+
Extérieur
diff --git a/gestioncof/views.py b/gestioncof/views.py
index e2f59d44..2d5f0487 100644
--- a/gestioncof/views.py
+++ b/gestioncof/views.py
@@ -43,7 +43,10 @@ def home(request):
def login(request):
if request.user.is_authenticated():
return redirect("gestioncof.views.home")
- return render(request, "login_switch.html", {})
+ context = {}
+ if request.method == "GET" and 'next' in request.GET:
+ context['next'] = request.GET['next']
+ return render(request, "login_switch.html", context)
def login_ext(request):
@@ -60,7 +63,13 @@ def login_ext(request):
{"error_type": "no_password"})
except User.DoesNotExist:
pass
- return django_login_view(request, template_name='login.html')
+ context = {}
+ if request.method == "GET" and 'next' in request.GET:
+ context['next'] = request.GET['next']
+ if request.method == "POST" and 'next' in request.POST:
+ context['next'] = request.POST['next']
+ return django_login_view(request, template_name='login.html',
+ extra_context=context)
@login_required