diff -r 5ff1fc726848 -r c6bca38c1cbf pytask/profile/templatetags/user_tags.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pytask/profile/templatetags/user_tags.py Sat Jan 08 11:20:57 2011 +0530 @@ -0,0 +1,12 @@ +from django import template + +register = template.Library() + +@register.filter +def notf_dsp(user): + + notf_cnt = user.notification_sent_to.filter(is_deleted=False, + is_read=False).count() + + return u'notifications(%s)'%notf_cnt if notf_cnt else u'notifications' +