From 1cca312e120dc3bef99286fe42d2958f9513581c Mon Sep 17 00:00:00 2001 From: Nishanth Amuluru Date: Fri, 7 Jan 2011 13:18:09 +0530 Subject: fixed few typos --- profile/views.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'profile/views.py') diff --git a/profile/views.py b/profile/views.py index 8dfed4a..0ed6afc 100755 --- a/profile/views.py +++ b/profile/views.py @@ -112,13 +112,16 @@ def delete_notification(request, nid): 'older':older, 'oldest':oldest, } - redirect_url = "/profile/notf/" + \ - "view/nid=%s"%older.uniq_key if older else "browse" + + if older: + redirect_url = "/profile/notf/view/nid=%s"%older.uniq_key + else: + redirect_url = "/profile/notf/browse" return redirect(redirect_url) @login_required -def unread_notification(request, nid) +def unread_notification(request, nid): """ check if the user owns the notification and delete it. """ @@ -140,7 +143,9 @@ def unread_notification(request, nid) 'oldest':oldest, } - redirect_url = "/profile/notf/" + \ - "view/nid=%s"%older.uniq_key if older else "browse" + if older: + redirect_url = "/profile/notf/view/nid=%s"%older.uniq_key + else: + redirect_url = "/profile/notf/browse" return redirect(redirect_url) -- cgit