Made timezone configurable
This commit is contained in:
parent
93ed8ec95b
commit
fad54a6472
|
@ -2,3 +2,4 @@
|
|||
title = A oder B
|
||||
separator = oder
|
||||
separator_char = ;
|
||||
timezone = Europe/Berlin
|
||||
|
|
3
game.py
3
game.py
|
@ -16,7 +16,7 @@ config = ConfigParser()
|
|||
config.read('config.ini')
|
||||
logging.basicConfig(encoding='utf-8', level=logging.INFO, format='%(message)s')
|
||||
logger = logging.getLogger('waitress')
|
||||
tz = pytz.timezone('Europe/Berlin')
|
||||
tz = pytz.timezone(config.get('main', 'timezone')
|
||||
|
||||
@app.after_request
|
||||
def log_the_request(response):
|
||||
|
@ -57,7 +57,6 @@ def log_the_request(response):
|
|||
logfile = "{} - {} [{}] \"{} {}\" {} {} \"{}\" \"{}\"".format(log['remote_addr'], log['remote_user'], log['date'], log['method'], log['url'], log['status_code'], log['content_length'], log['referrer'], log['user_agent'])
|
||||
logger.info(logfile)
|
||||
|
||||
|
||||
return response
|
||||
|
||||
@app.route("/")
|
||||
|
|
Loading…
Reference in New Issue