pytask/profile/templatetags/user_tags.py
changeset 69 c6bca38c1cbf
parent 60 696309b5ad59
equal deleted inserted replaced
68:5ff1fc726848 69:c6bca38c1cbf
       
     1 from django import template
       
     2 
       
     3 register = template.Library()
       
     4 
       
     5 @register.filter
       
     6 def notf_dsp(user):
       
     7 
       
     8     notf_cnt = user.notification_sent_to.filter(is_deleted=False,
       
     9                                                 is_read=False).count()
       
    10 
       
    11     return u'notifications(%s)'%notf_cnt if notf_cnt else u'notifications'
       
    12