예제 #1
0
파일: models.py 프로젝트: tloesch/get5-web
 def get_logo_html(self, scale=1.0):
     if logos.has_logo(self.logo):
         width = int(round(32.0 * scale))
         height = int(round(32.0 * scale))
         html = ('<img src="{}"  width="{}" height="{}">')
         return Markup(html.format(logos.get_logo_img(self.logo), width, height))
     else:
         return ''
예제 #2
0
 def get_logo_html(self, scale=1.0):
     if logos.has_logo(self.logo):
         width = int(round(32.0 * scale))
         height = int(round(32.0 * scale))
         html = ('<img src="{}"  width="{}" height="{}">')
         return Markup(
             html.format(logos.get_logo_img(self.logo), width, height))
     else:
         #app.logger.info("Looked for {} but found nothing.".format(self.logo))
         return ''
예제 #3
0
 def get_logo_or_flag_html(self, scale=1.0, other_team=None):
     if logos.has_logo(self.logo):
         return self.get_logo_html(scale)
     else:
         return self.get_flag_html(scale)
예제 #4
0
파일: models.py 프로젝트: splewis/get5-web
 def get_logo_or_flag_html(self, scale=1.0, other_team=None):
     if logos.has_logo(self.logo) and (other_team is None or logos.has_logo(other_team.logo)):
         return self.get_logo_html(scale)
     else:
         return self.get_flag_html(scale)
예제 #5
0
 def get_logo_or_flag_html(self, scale=0.75, other_team=None):
     if logos.has_logo(self.logo) and (other_team is None
                                       or logos.has_logo(other_team.logo)):
         return self.get_logo_html(scale)
     else:
         return self.get_flag_html(scale)