extratonal.org/packages/today/lektor_today.py
2023-11-26 23:34:10 +01:00

14 lines
260 B
Python

# -*- coding: utf-8 -*-
from lektor.pluginsystem import Plugin
import datetime
class TodayPlugin(Plugin):
name = 'today'
description = u'Whats today.'
def on_setup_env(self, **extra):
self.env.jinja_env.globals['today'] = datetime.datetime.today()