diff --git a/main.py b/main.py index c061fb2..2155665 100644 --- a/main.py +++ b/main.py @@ -34,6 +34,14 @@ def icon(icon_name): env.filters["icon"] = icon +# Filter for rendering a month name from a number +def month_name(month_number): + return datetime.date(1900, int(month_number), 1).strftime("%B") + + +env.filters["month_name"] = month_name + + def render_template_to_file(template_name, output_name, **kwargs): try: template = env.get_template(template_name) diff --git a/templates/transparency.html b/templates/transparency.html index 59626c2..3a76ea5 100644 --- a/templates/transparency.html +++ b/templates/transparency.html @@ -14,7 +14,7 @@ {% for month, month_data in year_data.items() %}