From 5f921de946c57235b28df8051a552928369e59e5 Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 16 Nov 2019 21:02:49 +0100 Subject: Favicon support --- jfr_playoff/generator.py | 5 +++++ jfr_playoff/template.py | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'jfr_playoff') diff --git a/jfr_playoff/generator.py b/jfr_playoff/generator.py index e640e03..f2dc22b 100644 --- a/jfr_playoff/generator.py +++ b/jfr_playoff/generator.py @@ -10,6 +10,7 @@ class PlayoffGenerator(object): def __init__(self, settings): self.data = PlayoffData(settings) self.page = settings.get('page') + print self.page.get('favicon') PlayoffLogger.get('generator').info( 'page settings: %s', self.page) self.team_box_settings = self.page.get('team_boxes', {}) @@ -40,6 +41,10 @@ class PlayoffGenerator(object): 'PAGE_HEAD_REFRESH', self.page['refresh']) \ if self.page['refresh'] > 0 else '', + self.p_temp.get( + 'PAGE_HEAD_FAVICON', + self.page['favicon']) \ + if len(self.page.get('favicon', '')) else '', self.page['title']), self.p_temp.get( 'PAGE_BODY', diff --git a/jfr_playoff/template.py b/jfr_playoff/template.py index a76ebcd..936a051 100644 --- a/jfr_playoff/template.py +++ b/jfr_playoff/template.py @@ -176,6 +176,7 @@ class PlayoffTemplateStrings(object): %s + %s %s @@ -186,6 +187,10 @@ class PlayoffTemplateStrings(object): ''' + PAGE_HEAD_FAVICON = ''' + + ''' + PAGE_BODY = ''' %s -- cgit v1.2.3