server/src/metaeducation/middleware.py
changeset 4 8bc8b208441d
parent 1 5f50937893ac
child 15 8004d8fc9b38
--- a/server/src/metaeducation/middleware.py	Wed Feb 17 11:25:20 2016 +0100
+++ b/server/src/metaeducation/middleware.py	Wed Feb 17 16:14:04 2016 +0100
@@ -18,6 +18,5 @@
                 if request.GET.get("context", ""):
                     context = request.GET["context"]
                     response = redirect(settings.LOGIN_URL)
-                    response["LOCATION"] += "?"+urlencode({"context": context})
-                    print(response["LOCATION"])
+                    response["LOCATION"] += "?"+urlencode({"context": context, "next": "/"+path})
                     return response