diff options
author | André Glüpker <git@wgmd.de> | 2021-02-16 17:55:14 +0100 |
---|---|---|
committer | André Glüpker <git@wgmd.de> | 2021-02-16 17:55:14 +0100 |
commit | c4db6130dcf2c78b3b0e05bc98d9a830a51dbfe3 (patch) | |
tree | 0bdecf78293e3eac8bd8d91adfdd7b573f3c8755 /main.py | |
parent | 35cbe04e67ca59a657bc685f0764a7737115333d (diff) | |
download | steam-c4db6130dcf2c78b3b0e05bc98d9a830a51dbfe3.tar.gz steam-c4db6130dcf2c78b3b0e05bc98d9a830a51dbfe3.tar.bz2 steam-c4db6130dcf2c78b3b0e05bc98d9a830a51dbfe3.zip |
Change format_datetime to be a Jinja2 filter
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -53,6 +53,8 @@ def display_time(seconds, granularity=2): result.append("{}{}".format(int(value), name)) return ' '.join(result[:granularity]) +app.jinja_env.filters['display_time'] = display_time + def grepSteamids(text): steamids = [] SteamIDfromText = re.findall(r'STEAM_\d:(\d):(\d+)', text) @@ -131,7 +133,6 @@ def lobby(): serverinfo = serverinfo, gamelist = gamelist, states = ['Offline', 'Online', 'Busy', 'Away', 'Snooze', 'Looking to trade', 'Looking to play'], - display_time = display_time, current_time = time.time()) @app.route("/premadefinder", methods=['GET', 'POST']) @@ -166,7 +167,6 @@ def premades(): return render_template('premades_html.jinja', steamids=steamids, profiles=premadedata, - display_time=display_time, current_time = time.time(), connections=connections ) @@ -204,7 +204,6 @@ def server(): return render_template('server_html.jinja', servers=servers, - display_time = display_time ) if __name__ == '__main__': |