def avatar(user, size=80): if not appsettings.ENABLE_AVATARS: return '' url = avatar_for_email(user.email, size) alt = escape(_('Avatar for %s') % get_user_display(user, False)) return """<img src="%s" alt="Avatar for %s" height="%s" width="%s"/>""" % ( url, alt, size, size )
def get_user_name(self): return get_user_display(self.user, False)
def get_user_display_link(self): return get_user_display(self.user, True, True)
def get_user_display(self): return get_user_display(self.user)
def get_user_display(self, icon=True): return get_user_display(self.user, icon, link=True)
def get_lock_user_display(self): ''' Returns formatted lock user. ''' return get_user_display(self.lock_user)
def get_user_display(self): return get_user_display(self.user, link=True)
def avatar(user, size=80): url = avatar_for_email(user.email, size) alt = escape(_('Avatar for %s') % get_user_display(user, False)) return """<img src="%s" alt="Avatar for %s" height="%s" width="%s"/>""" % ( url, alt, size, size)
def get_lock_user_display(self): """ Returns formatted lock user. """ return get_user_display(self.lock_user)
def gravatar(user, size=80): url = gravatar_for_email(user.email, size) alt = escape(_('Avatar for %s') % get_user_display(user, False)) return """<img src="%s" alt="Avatar for %s" height="%s" width="%s"/>""" % ( url, alt, size, size )