# HG changeset patch # User Madhusudan.C.S # Date 1295293807 -19800 # Node ID 4b4e299add3b0b9d0b0de3e0640b832f334ee9f1 # Parent f10fe304298cc6ed24f3c346fa1de54ee4ef4e86 A new view for processing post login to give the right html to replace for user action right sidebar. diff -r f10fe304298c -r 4b4e299add3b pytask/profile/urls.py --- a/pytask/profile/urls.py Tue Jan 18 01:19:41 2011 +0530 +++ b/pytask/profile/urls.py Tue Jan 18 01:20:07 2011 +0530 @@ -17,4 +17,5 @@ 'unread_notification', name='unread_notification'), url(r'^user/view/(?P\d+)$', 'view_user', name='view_user'), + url(r'^login/proceed$', 'login_proceed', name='login_proceed'), ) diff -r f10fe304298c -r 4b4e299add3b pytask/profile/views.py --- a/pytask/profile/views.py Tue Jan 18 01:19:41 2011 +0530 +++ b/pytask/profile/views.py Tue Jan 18 01:20:07 2011 +0530 @@ -190,4 +190,20 @@ "can_view_info": can_view_info, } - return shortcuts.render_to_response("profile/view_user.html", context) + return shortcuts.render_to_response("profile/view_user.html", + RequestContext(request, context)) + +@login_required +def login_proceed(request): + """View that handles the successful login. + """ + + template_name = '_user_login.html' + response = { + 'authentication': 'success', + 'markup': loader.render_to_string(template_name, + RequestContext(request, {})) + } + + json_response = json.dumps(response) + return http.HttpResponse(json_response) diff -r f10fe304298c -r 4b4e299add3b pytask/settings.py --- a/pytask/settings.py Tue Jan 18 01:19:41 2011 +0530 +++ b/pytask/settings.py Tue Jan 18 01:20:07 2011 +0530 @@ -103,4 +103,5 @@ #django-registration ACCOUNT_ACTIVATION_DAYS = 7 DEFAULT_FROM_EMAIL = 'FOSSEE Admin ' -LOGIN_REDIRECT_URL = '/' + +LOGIN_REDIRECT_URL = '/profile/login/proceed'