diff --git a/main.py b/main.py index a16b13a..85d01c4 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,7 @@ import argparse import bottle -import templates +TEMPLATE_INDEX = bottle.SimpleTemplate(name = "templates/index.html") # @@ -24,7 +24,7 @@ def render_calendar(events_map, today): 'already_past': day_of_month < today, 'events': events_map.get(day_of_month, []), }) - return bottle.template(templates.TEMPLATE_INDEX, days = days) + return TEMPLATE_INDEX.render(days = days) ## Paths diff --git a/templates.py b/templates/index.html similarity index 98% rename from templates.py rename to templates/index.html index 3ad801f..74c006a 100644 --- a/templates.py +++ b/templates/index.html @@ -1,4 +1,3 @@ -TEMPLATE_INDEX = ''' @@ -51,6 +50,3 @@ TEMPLATE_INDEX = ''' -''' - -