# HG changeset patch # User Madhusudan.C.S # Date 1295352297 -19800 # Node ID 6f5a60ce7d2539b7a0e3f5e5c5507fac15221257 # Parent c7c595c0bed3baed826c80d173e474cdc6862350 Redirect successful login to profile page if logged in from activation complete. diff -r c7c595c0bed3 -r 6f5a60ce7d25 pytask/profile/views.py --- a/pytask/profile/views.py Tue Jan 18 17:34:29 2011 +0530 +++ b/pytask/profile/views.py Tue Jan 18 17:34:57 2011 +0530 @@ -204,12 +204,17 @@ # Check if the request came from logout page, if so set # authentication to redirect to home page - if reverse('auth_logout') == urlparse.urlsplit( - request.META['HTTP_REFERER'])[2]: + referer_path = urlparse.urlsplit(request.META['HTTP_REFERER'])[2] + if referer_path == reverse('auth_logout'): response = { 'authentication': 'success', 'redirect': reverse('home_page'), } + elif referer_path == reverse('registration_activation_complete'): + response = { + 'authentication': 'success', + 'redirect': reverse('view_profile'), + } else: response = { 'authentication': 'success',