def render(self, context):
        try:
            user = context['user']
            count = user.received_messages.filter(read_at__isnull=True, recipient_deleted_at__isnull=True).count()
        except (__HOLE__, AttributeError):
            count = ''
        if self.varname is not None:
            context[self.varname] = count
            return ""
        else:
            return "%s" % (count)
dataset/ETHPy150Open amarandon/smeuhsocial/apps/messages/templatetags/inbox.py/InboxOutput.render