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:
29
main.py
29
main.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user