summaryrefslogtreecommitdiff
path: root/jfr_playoff/generator.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-10-02 12:43:11 +0200
committeremkael <emkael@tlen.pl>2018-10-02 12:44:30 +0200
commit6119175f65c6bc12771a968cd72e6c8179848f78 (patch)
tree29203d0f6689798ce3e458f111af020f02de483f /jfr_playoff/generator.py
parent62fe5244beb1a859b86aae86d784a86b30d86ca9 (diff)
Templates and strings for new team label rendering method
Diffstat (limited to 'jfr_playoff/generator.py')
-rw-r--r--jfr_playoff/generator.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py
index f2a2c55..fab6d0e 100644
--- a/jfr_playoff/generator.py
+++ b/jfr_playoff/generator.py
@@ -51,6 +51,12 @@ class PlayoffGenerator(object):
'PAGE_BODY_FOOTER',
datetime.now().strftime('%Y-%m-%d o %H:%M:%S'))))
+ def __get_team_label(self, team_name, template='MATCH_TEAM_LABEL'):
+ if not self.page.get('predict_teams', None):
+ # override template if team predictions are not enabled
+ template = 'MATCH_TEAM_LABEL'
+ return self.p_temp.get(template, team_name)
+
def get_match_table(self, match):
rows = ''
for team in match.teams: