From 0b1ced646f15f35d7ec3dea4bb24b5f903794095 Mon Sep 17 00:00:00 2001 From: Miguel Barão Date: Wed, 15 Mar 2017 11:44:54 +0000 Subject: [PATCH] - show points with two decimal places. - show path to questions yaml file when the option show_ref is True. --- serve.py | 5 +++-- templates/test.html | 14 +++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/serve.py b/serve.py index fecf886..a5814be 100755 --- a/serve.py +++ b/serve.py @@ -334,9 +334,10 @@ if __name__ == '__main__': try: app = App(filename, vars(arg)) - except: + except Exception as e: logging.critical('Can\'t start application.') - sys.exit(1) + raise e + # sys.exit(1) # --- create webserver webapp = Root(app) diff --git a/templates/test.html b/templates/test.html index f0c1fcd..6ea029c 100644 --- a/templates/test.html +++ b/templates/test.html @@ -181,7 +181,7 @@ % if t['show_points']:

- (Cotação: ${round(q['points'] / total_points * 20.0, 1)} pontos) + (Cotação: ${round(q['points'] / total_points * 20.0, 2)} pontos)

% endif @@ -199,10 +199,14 @@ % if t['show_ref']:

-
filename:
-
${q['filename']}
-
ref:
-
${q['ref']}
+
path:
+
${q['path']}
+ +
filename:
+
${q['filename']}
+ +
ref:
+
${q['ref']}
% endif -- libgit2 0.21.2