X-Git-Url: https://plomlompom.com/repos/new_day?a=blobdiff_plain;ds=sidebyside;f=todo.py;h=7b8b83e5ddfe34aa42cb9e6b6e3021b3ceadde71;hb=fde1097e391b9ec0c261f1e91bd203232b3fbcb3;hp=444923218121b91d648f2ba87052ea3801dd838a;hpb=93756ded23b6f80333ef26e434f611a94bd04764;p=misc diff --git a/todo.py b/todo.py index 4449232..7b8b83e 100644 --- a/todo.py +++ b/todo.py @@ -1,75 +1,24 @@ -from plomlib import PlomDB, run_server, PlomHandler, PlomException +from plomlib import PlomDB, run_server, PlomHandler, PlomException import json from uuid import uuid4 -from datetime import datetime +from datetime import datetime, timedelta from urllib.parse import parse_qs from jinja2 import Template +from jinja2 import Environment as JinjaEnv, FileSystemLoader as JinjaFSLoader from urllib.parse import urlparse db_path = '/home/plom/org/todo_new.json' -# db_path = '/home/plom/public_repos/misc/todo_new.json' server_port = 8082 - -html_head = """ - -
-all | edit day: -choose -do -{{ date }} ({{ day.todos_sum |round(2) }}) {{ day.comment|e }} | ||
{{ todo.title }} | {% if todo.done %}â{% endif %} | {{ todo.weight }} |