From 91b60fa76dfb69b734f558f5f333fdf828feb5aa Mon Sep 17 00:00:00 2001 From: tanshu Date: Fri, 3 Oct 2014 15:34:49 +0530 Subject: [PATCH] Feature: Maybe? Login redirect now supports query string --- brewman/static/scripts/overlord.js | 2 +- brewman/views/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/brewman/static/scripts/overlord.js b/brewman/static/scripts/overlord.js index e1374269..b8a93fec 100644 --- a/brewman/static/scripts/overlord.js +++ b/brewman/static/scripts/overlord.js @@ -141,7 +141,7 @@ overlord.controller('BaseCtrl', ['$rootScope', '$scope', 'Auth', '$location', '$ } else { var came_from = $routeParams.came_from; if (angular.isUndefined(came_from) && $location.path() !== '/login') { - came_from = $location.path(); + came_from = $location.url(); } $location.path('/login').search({came_from: came_from}); } diff --git a/brewman/views/__init__.py b/brewman/views/__init__.py index 619dcff8..5d7ff43c 100644 --- a/brewman/views/__init__.py +++ b/brewman/views/__init__.py @@ -28,7 +28,7 @@ def forbidden(request): response.status_int = 401 return response else: - return HTTPFound(location=request.route_url('login', _query={'came_from': request.path})) + return HTTPFound(location=request.route_url('login', _query={'came_from': request.path_qs})) @view_config(route_name='favicon')