Commit 1d59adf6 authored by Andreas Valder's avatar Andreas Valder
Browse files

always show git commit

parent 87eba101
......@@ -54,9 +54,10 @@ if sys.argv[0].endswith('run.py'):
config.from_pyfile('config.py', silent=True)
if config['DEBUG']:
app.jinja_env.auto_reload = True
# get git commit
import subprocess
app.jinja_env.globals['gitversion'] = subprocess.check_output(['git', "log", "-g", "-1", "--pretty=%h # %d # %s"]).decode('UTF-8').split('#')
# get git commit
import subprocess
app.jinja_env.globals['gitversion'] = subprocess.check_output(['git', "log", "-g", "-1", "--pretty=%h # %d # %s"]).decode('UTF-8').split('#')
if not config.get('SECRET_KEY', None):
config['SECRET_KEY'] = os.urandom(24)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment