X-Git-Url: https://plomlompom.com/repos/condition_titles?a=blobdiff_plain;ds=sidebyside;f=income_progress_bars.py;h=5d9a887323feb2cc7da85f1e81dae7bc696d83f2;hb=59056f396c4761f9cd7ffbc569e3ddf8994d5e83;hp=bccfc24142896db7d4bf945a8ec37d80f90564b7;hpb=5ca43356293c713a280d049578a987a2f46e5038;p=misc diff --git a/income_progress_bars.py b/income_progress_bars.py index bccfc24..5d9a887 100644 --- a/income_progress_bars.py +++ b/income_progress_bars.py @@ -1,13 +1,12 @@ -from http.server import BaseHTTPRequestHandler, HTTPServer import os import json import jinja2 +from plomlib import PlomDB, PlomException, run_server, PlomHandler -hostName = "localhost" -serverPort = 8081 +server_port = 8083 +db_path = '/home/plom/org/income.json' -tmpl = jinja2.Template(""" - +tmpl = """
earned | progress | surplus | |
---|---|---|---|
{{p.title}} | +|||
earned | progress | surplus | |
{{p.title}} | {{p.earned|round(2)}} | -{% if p.time_progress >= 0 %}{% endif %} | -{{p.diff_goal}} |