Working logout function
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 3 Apr 2011 23:23:40 +0000 (18:23 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 3 Apr 2011 23:23:40 +0000 (18:23 -0500)
mediagoblin/auth/views.py

index 16588a5b6c3d90dbe68c9d940181fb289a33a8c3..71c2d7a9b1a8daad5d25929f7d2f8bd00934752b 100644 (file)
@@ -112,8 +112,8 @@ def login(request):
 
 
 def logout(request):
-    template = request.template_env.get_template(
-        'mediagoblin/auth/logout.html')
-    return Response(
-        template.render(
-            {'request': request}))
+    # Maybe deleting the user_id parameter would be enough?
+    request.session.delete()
+    
+    return exc.HTTPFound(
+        location=request.urlgen("index"))