aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-04-23 08:46:02 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-04-23 08:46:02 -0500
commit7eba0306d84adb35af9d1ad2568f11f0cdd2f7a7 (patch)
tree8a73a14495270b3fece15e52d049be7b051f440e
parentefb291d633b7ad2a8246b9b7f4ae0c7603b7572f (diff)
downloadmediagoblin-7eba0306d84adb35af9d1ad2568f11f0cdd2f7a7.tar.lz
mediagoblin-7eba0306d84adb35af9d1ad2568f11f0cdd2f7a7.tar.xz
mediagoblin-7eba0306d84adb35af9d1ad2568f11f0cdd2f7a7.zip
Provide a next= url when we require logging in
-rw-r--r--mediagoblin/decorators.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mediagoblin/decorators.py b/mediagoblin/decorators.py
index c6b4b545..81b88c9d 100644
--- a/mediagoblin/decorators.py
+++ b/mediagoblin/decorators.py
@@ -37,7 +37,9 @@ def require_active_login(controller):
# TODO: Indicate to the user that they were redirected
# here because an *active* user is required.
return exc.HTTPFound(
- location=request.urlgen("mediagoblin.auth.login"))
+ location="%s?next=%s" % (
+ request.urlgen("mediagoblin.auth.login"),
+ request.path_info))
return controller(request, *args, **kwargs)