Commit 0b1ced646f15f35d7ec3dea4bb24b5f903794095
1 parent
8f401eb7
Exists in
master
and in
1 other branch
- show points with two decimal places.
- show path to questions yaml file when the option show_ref is True.
Showing
2 changed files
with
12 additions
and
7 deletions
Show diff stats
serve.py
@@ -334,9 +334,10 @@ if __name__ == '__main__': | @@ -334,9 +334,10 @@ if __name__ == '__main__': | ||
334 | 334 | ||
335 | try: | 335 | try: |
336 | app = App(filename, vars(arg)) | 336 | app = App(filename, vars(arg)) |
337 | - except: | 337 | + except Exception as e: |
338 | logging.critical('Can\'t start application.') | 338 | logging.critical('Can\'t start application.') |
339 | - sys.exit(1) | 339 | + raise e |
340 | + # sys.exit(1) | ||
340 | 341 | ||
341 | # --- create webserver | 342 | # --- create webserver |
342 | webapp = Root(app) | 343 | webapp = Root(app) |
templates/test.html
@@ -181,7 +181,7 @@ | @@ -181,7 +181,7 @@ | ||
181 | 181 | ||
182 | % if t['show_points']: | 182 | % if t['show_points']: |
183 | <p class="text-right"> | 183 | <p class="text-right"> |
184 | - <small>(Cotação: ${round(q['points'] / total_points * 20.0, 1)} pontos)</small> | 184 | + <small>(Cotação: ${round(q['points'] / total_points * 20.0, 2)} pontos)</small> |
185 | <p> | 185 | <p> |
186 | % endif | 186 | % endif |
187 | 187 | ||
@@ -199,10 +199,14 @@ | @@ -199,10 +199,14 @@ | ||
199 | 199 | ||
200 | % if t['show_ref']: | 200 | % if t['show_ref']: |
201 | <dl class="dl-horizontal"> | 201 | <dl class="dl-horizontal"> |
202 | - <dt>filename:</dt> | ||
203 | - <dd>${q['filename']}</dd> | ||
204 | - <dt>ref:</dt> | ||
205 | - <dd>${q['ref']}</dd> | 202 | + <dt>path:</dt> |
203 | + <dd>${q['path']}</dd> | ||
204 | + | ||
205 | + <dt>filename:</dt> | ||
206 | + <dd>${q['filename']}</dd> | ||
207 | + | ||
208 | + <dt>ref:</dt> | ||
209 | + <dd>${q['ref']}</dd> | ||
206 | </dl> | 210 | </dl> |
207 | % endif | 211 | % endif |
208 | 212 |