From dd41718647caf2a93cc01c1739c012dd692edde5 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Thu, 19 Nov 2020 10:04:39 +0800 Subject: [PATCH] Updating for 2020 season --- app.yaml | 2 +- dbWrite.py | 4 ++-- forms.py | 8 ++++---- routes/_hkfcD_motm.py | 2 +- templates/_convenorFixtureList.html | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app.yaml b/app.yaml index d548f3b..bc5b86d 100644 --- a/app.yaml +++ b/app.yaml @@ -27,7 +27,7 @@ env_variables: CLOUDSQL_PASSWORD: P8P1YopMlwg8TxhE CLOUDSQL_WRITE_PASSWORD: 1URYcxXXlQ6xOWgj CLOUDSQL_READ_PASSWORD: o4GWrbbkBKy3oR6u - CLOUDSQL_DATABASE: 2019_hockeyResults + CLOUDSQL_DATABASE: 2020_hockeyResults CLOUDSQL_DATABASE_STATIC: hockeyResults CLOUDSQL_CHARSET: utf8 BASIC_AUTH_USERNAME: admin diff --git a/dbWrite.py b/dbWrite.py index f20b81f..5151bc4 100644 --- a/dbWrite.py +++ b/dbWrite.py @@ -12,8 +12,8 @@ CLOUDSQL_READ_USER = "hockeyRead" CLOUDSQL_PASSWORD = "P8P1YopMlwg8TxhE" CLOUDSQL_WRITE_PASSWORD = "1URYcxXXlQ6xOWgj" CLOUDSQL_READ_PASSWORD = "o4GWrbbkBKy3oR6u" -CLOUDSQL_DATABASE = "2019_hockeyResults" -LOCAL_DATABASE = "hockeyResults2019" +CLOUDSQL_DATABASE = "20209_hockeyResults" +LOCAL_DATABASE = "hockeyResults2020" CLOUDSQL_DATABASE_STATIC = "hockeyResults" CLOUDSQL_CHARSET = "utf8" diff --git a/forms.py b/forms.py index 41f5ca2..19e3529 100644 --- a/forms.py +++ b/forms.py @@ -54,7 +54,7 @@ class playerDbCreateForm(FlaskForm): class searchForm(FlaskForm): seasonStart = datetime.strptime('2018-09-01', '%Y-%m-%d') - season = SelectField('Season data to search', choices=[('2019', '2019/20'), ('2018', '2018/19'), ('2017', '2017/18'), ('2016', '2016/17'), ('2015', '2015/16'), ('2014', '2014/15'), ('2013', '2013/14')]) + season = SelectField('Season data to search', choices=[('2020', '2020/21'), ('2019', '2019/20'), ('2018', '2018/19'), ('2017', '2017/18'), ('2016', '2016/17'), ('2015', '2015/16'), ('2014', '2014/15'), ('2013', '2013/14')]) clubName = SelectField("Club to search", choices=[], coerce=str) teamName = SelectField("Select a Team", choices=[]) startDate = DateField('DatePicker', format='%Y-%m-%d', default=seasonStart) @@ -62,19 +62,19 @@ class searchForm(FlaskForm): submitButton = SubmitField("Submit") class playerRecordsForm(FlaskForm): - season = SelectField('Season data to search', choices=[('2019', '2019/20'), ('2018', '2018/19'), ('2017', '2017/18'), ('2016', '2016/17'), ('2015', '2015/16'), ('2014', '2014/15'), ('2013', '2013/14')]) + season = SelectField('Season data to search', choices=[('2020', '2020/21'), ('2019', '2019/20'), ('2018', '2018/19'), ('2017', '2017/18'), ('2016', '2016/17'), ('2015', '2015/16'), ('2014', '2014/15'), ('2013', '2013/14')]) clubName = SelectField("Club to search", choices=[], coerce=str) teamName = SelectField("Select a Team", choices=[]) submitButton = SubmitField("Submit") class teamRecordsForm(FlaskForm): - season = SelectField('Season data to search', choices=[('2019', '2019/20'), ('2018', '2018/19'), ('2017', '2017/18'), ('2016', '2016/17'), ('2015', '2015/16'), ('2014', '2014/15'), ('2013', '2013/14')]) + season = SelectField('Season data to search', choices=[('2020', '2020/21'), ('2019', '2019/20'), ('2018', '2018/19'), ('2017', '2017/18'), ('2016', '2016/17'), ('2015', '2015/16'), ('2014', '2014/15'), ('2013', '2013/14')]) clubName = SelectField("Club to search", choices=[], coerce=str) teamName = SelectField("Select a Team", choices=[]) submitButton = SubmitField("Submit") class clubPlayingRecordsForm(FlaskForm): - season = SelectField('Season data to search', choices=[('2019', '2019/20'), ('2018', '2018/19'), ('2017', '2017/18'), ('2016', '2016/17'), ('2015', '2015/16'), ('2014', '2014/15'), ('2013', '2013/14')]) + season = SelectField('Season data to search', choices=[('2020', '2020/21'), ('2019', '2019/20'), ('2018', '2018/19'), ('2017', '2017/18'), ('2016', '2016/17'), ('2015', '2015/16'), ('2014', '2014/15'), ('2013', '2013/14')]) clubName = SelectField("Club to search", choices=[], coerce=str) submitButton = SubmitField("Submit") diff --git a/routes/_hkfcD_motm.py b/routes/_hkfcD_motm.py index 484fc3e..0cfa602 100644 --- a/routes/_hkfcD_motm.py +++ b/routes/_hkfcD_motm.py @@ -31,7 +31,7 @@ def hkfcD_motm_vote(randomUrlSuffix): currMotM = nextInfo[0]['currMotM'] currDotD = nextInfo[0]['currDotD'] oppo = nextTeam - sql3 = "SELECT 2019_hockeyResults.hockeyFixtures.date, hockeyResults.hkfcDAdminSettings.nextFixture FROM 2019_hockeyResults.hockeyFixtures INNER JOIN hockeyResults.hkfcDAdminSettings ON 2019_hockeyResults.hockeyFixtures.fixtureNumber = hockeyResults.hkfcDAdminSettings.nextFixture" + sql3 = "SELECT 2020_hockeyResults.hockeyFixtures.date, hockeyResults.hkfcDAdminSettings.nextFixture FROM 2020_hockeyResults.hockeyFixtures INNER JOIN hockeyResults.hkfcDAdminSettings ON 2020_hockeyResults.hockeyFixtures.fixtureNumber = hockeyResults.hkfcDAdminSettings.nextFixture" nextMatchDate = sql_read(sql3) nextDate = nextMatchDate[0]['date'] formatDate = datetime.strftime(nextDate, '%A, %d %B %Y') diff --git a/templates/_convenorFixtureList.html b/templates/_convenorFixtureList.html index 23d838c..fe86e13 100644 --- a/templates/_convenorFixtureList.html +++ b/templates/_convenorFixtureList.html @@ -1,6 +1,6 @@ - Fixture List 2019/20 season + Fixture List 2020/21 season