improved about page to include BUGs and TODO, still better formatting required,and build date to be handled separate to last commit date

This commit is contained in:
2023-01-03 00:34:03 +11:00
parent 06846b86c5
commit be3e2ae19e
5 changed files with 48 additions and 4 deletions

29
main.py
View File

@@ -172,7 +172,34 @@ def about():
# add last commit (or fake commit if no file)
commits.append(o)
return render_template("about.html", commits=commits)
bugs=[]
try:
with open( 'internal/BUGs', 'r' ) as fp:
can_add=False
for l in fp:
print(l)
if not l.startswith( 'BUG' ):
if can_add:
b['str']=b['str']+'<br>'+l
else:
pass
else:
if can_add:
bugs.append(b)
b={}
b['str']=l
can_add=True
except FileNotFoundError:
b={}
b['str']="No BUGs defined - cannot find BUGs file!?"
bugs.append(b)
try:
with open( 'internal/TODO', 'r' ) as fp:
todo=fp.read()
except FileNotFoundError:
todo="No TODOs defined - cannot find TODO file!?"
return render_template("about.html", commits=commits, bugs=bugs, todo=todo)
@app.route('/logout')
@login_required