X-Git-Url: https://plomlompom.com/repos/new_day?a=blobdiff_plain;ds=sidebyside;f=todo.py;h=3ea09b0d7b7e42b4893c15b7274b7de85c7343bf;hb=979de59ced9fe3fd3860d19288b42485d7f02346;hp=6cade91bf560fb45b42225631aa5cd9e5a089fee;hpb=bd32647c67dd9a4979a39efaf31bfe63c82c72d0;p=misc diff --git a/todo.py b/todo.py index 6cade91..3ea09b0 100644 --- a/todo.py +++ b/todo.py @@ -3,551 +3,797 @@ import json from uuid import uuid4 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 +from os.path import split as path_split db_path = '/home/plom/org/todo_new.json' -# db_path = '/home/plom/public_repos/misc/todo_new.json' server_port = 8082 DATE_FORMAT = '%Y-%m-%d' +j2env = JinjaEnv(loader=JinjaFSLoader('todo_templates')) -html_head = """ - -
-tasks: list add | day: -choose tasks -do tasks -| calendar -| unset cookie -