new file: appengine_config.py new file: dbWrite.py new file: forms.py new file: main.py new file: readSettings.py new file: requirements.txt new file: routes/__init__.py new file: routes/_convenor.py new file: routes/_hkfcD_motm.py new file: routes/_matches.py new file: routes/_search.py new file: routes/dashboard.py new file: static/css/bootstrap-theme.css new file: static/css/bootstrap-theme.css.map new file: static/css/bootstrap-theme.min.css new file: static/css/bootstrap-theme.min.css.map new file: static/css/bootstrap.css new file: static/css/bootstrap.css.map new file: static/css/bootstrap.min.css new file: static/css/bootstrap.min.css.map new file: static/css/dashboard.css new file: static/css/dashboard.css.orig new file: static/fonts/glyphicons-halflings-regular.eot new file: static/fonts/glyphicons-halflings-regular.svg new file: static/fonts/glyphicons-halflings-regular.ttf new file: static/fonts/glyphicons-halflings-regular.woff new file: static/fonts/glyphicons-halflings-regular.woff2 new file: static/js/bootstrap.js new file: static/js/bootstrap.min.js new file: static/js/dashboard.js new file: static/js/npm.js new file: tables.py new file: templates/_about.html new file: templates/_clubPlayingRecordResults.html new file: templates/_clubPlayingRecords.html new file: templates/_convenorClubAdd.html new file: templates/_convenorClubAddResults.html new file: templates/_convenorClubList.html new file: templates/_convenorEditPlayerResults.html new file: templates/_convenorEditSquadList.html new file: templates/_convenorEditSquadListTeamSelect.html new file: templates/_convenorFixtureList.html new file: templates/_convenorPlayerAdd.html new file: templates/_convenorPlayerAddResults.html new file: templates/_convenorPlayerDbCreate.html new file: templates/_convenorPlayerDbCreateResults.html new file: templates/_convenorPlayerEdit.html new file: templates/_convenorSquadList.html new file: templates/_convenorSquadListResults.html new file: templates/_convenorTeamAdd.html new file: templates/_convenorTeamAddResults.html new file: templates/_error.html new file: templates/_goalsAssistsAdmin.html new file: templates/_hkfcDAdminThanks.html new file: templates/_hkfcDGoalsThanks.html new file: templates/_hkfcDMatchComments.html new file: templates/_hkfcDMatchSquad.html new file: templates/_hkfcDMatchSquadReset.html new file: templates/_hkfcDMatchSquadSelected.html new file: templates/_hkfcDMotmAdmin.html new file: templates/_hkfcDMotmVote.html new file: templates/_hkfcDPlayerRemoved.html new file: templates/_hkfcDPotYChart.html new file: templates/_hkfcDVoteChart.html new file: templates/_hkfcDVoteThanks.html new file: templates/_hkfcPlayerDeleted.html new file: templates/_matchDetails.html new file: templates/_playerCheck.html new file: templates/_playerCheckResults.html new file: templates/_playerRecordResults.html new file: templates/_playerRecords.html new file: templates/_search.html new file: templates/_searchResults.html new file: templates/_teamRecordResults.html new file: templates/_teamRecords.html new file: templates/dashboard.html new file: templates/results.html new file: templates/search.html Initial commit
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
#import MySQLdb
|
|
import pymysql
|
|
import os
|
|
import json
|
|
from app import app
|
|
#from dbWrite import read_cloudsql, sql_read, write_cloudsql, sql_write, read_cloudsql_static, sql_read_static, write_cloudsql_static, sql_write_static
|
|
from dbWrite import sql_read_static
|
|
|
|
|
|
def mySettings(arg):
|
|
sql2 = "SELECT nextClub, nextTeam, nextDate, oppoLogo, hkfcLogo, currMotM, currDotD, nextFixture, prevFixture FROM hkfcDAdminSettings"
|
|
settingsInfo = sql_read_static(sql2)
|
|
nextClub = settingsInfo[0]['nextClub']
|
|
nextTeam = settingsInfo[0]['nextTeam']
|
|
nextDate = settingsInfo[0]['nextDate']
|
|
hkfcLogo = settingsInfo[0]['hkfcLogo']
|
|
oppoLogo = settingsInfo[0]['oppoLogo']
|
|
currMotM = settingsInfo[0]['currMotM']
|
|
currDotD = settingsInfo[0]['currDotD']
|
|
fixtureNumber = settingsInfo[0]['nextFixture']
|
|
prevFixture = settingsInfo[0]['prevFixture']
|
|
|
|
if arg == 'club':
|
|
return nextClub
|
|
elif arg == 'team':
|
|
return nextTeam
|
|
elif arg == 'date':
|
|
return nextDate
|
|
elif arg == 'motm':
|
|
return currMotM
|
|
elif arg == 'dotd':
|
|
return currDotD
|
|
elif arg == 'fixture':
|
|
return fixtureNumber
|
|
elif arg == 'prevFixture':
|
|
return prevFixture
|
|
else:
|
|
return settingsInfo
|
|
|