diff options
-rw-r--r-- | jfr_playoff/generator.py | 10 | ||||
-rw-r--r-- | jfr_playoff/template.py | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py index 5411e0e..7d108d2 100644 --- a/jfr_playoff/generator.py +++ b/jfr_playoff/generator.py @@ -1,4 +1,5 @@ from datetime import datetime +import urlparse from jfr_playoff.dto import coalesce from jfr_playoff.template import PlayoffTemplate @@ -435,4 +436,11 @@ class PlayoffGenerator(object): def get_flag(self, team): flag = self.data.get_team_image(team) - return '' if flag is None else self.p_temp.get('LEADERBOARD_ROW_FLAG', flag) + return '' \ + if flag is None \ + else self.p_temp.get( + 'LEADERBOARD_ROW_FLAG', + '' + if bool(urlparse.urlparse(flag).netloc) + else 'images/', + flag) diff --git a/jfr_playoff/template.py b/jfr_playoff/template.py index c4e6d4f..c72378c 100644 --- a/jfr_playoff/template.py +++ b/jfr_playoff/template.py @@ -149,7 +149,7 @@ class PlayoffTemplateStrings(object): '''
LEADERBOARD_ROW_FLAG = '''
- <img class="fl" src="images/%s" />
+ <img class="fl" src="%s%s" />
'''
LEADERBOARD_CAPTION_TABLE = '''
|