profile/views.py
changeset 50 869a9ab7e2df
parent 49 d24b4a7147d2
child 51 4607a50e7f00
--- a/profile/views.py	Fri Jan 07 13:11:51 2011 +0530
+++ b/profile/views.py	Fri Jan 07 13:18:09 2011 +0530
@@ -112,13 +112,16 @@
                '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 @@
                '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)