build process (via Dockerfile) now timestamps build and that is exposed on about page
This commit is contained in:
14
main.py
14
main.py
@@ -199,7 +199,19 @@ def about():
|
||||
todo=fp.read()
|
||||
except FileNotFoundError:
|
||||
todo="No TODOs defined - cannot find TODO file!?"
|
||||
return render_template("about.html", commits=commits, bugs=bugs, todo=todo)
|
||||
try:
|
||||
with open( 'internal/build-date.txt', 'r' ) as fp:
|
||||
if 'ENV' in os.environ:
|
||||
build_info=os.environ['ENV']
|
||||
else:
|
||||
build_info="Development"
|
||||
build_info = build_info + " version built on: " + fp.read()
|
||||
except FileNotFoundError:
|
||||
if 'ENV' not in os.environ or os.environ['ENV'] == "development":
|
||||
build_info="Development version"
|
||||
else:
|
||||
build_info="No build info found!?"
|
||||
return render_template("about.html", commits=commits, bugs=bugs, todo=todo, build_info=build_info)
|
||||
|
||||
@app.route('/logout')
|
||||
@login_required
|
||||
|
||||
Reference in New Issue
Block a user