Make the date format user configurable

This commit is contained in:
2021-12-24 06:49:37 +00:00
parent 0fdfe811f8
commit 30543409e0
3 changed files with 8 additions and 1 deletions

View File

@@ -94,6 +94,11 @@ def get_greeting():
return 'こんにちは'
@base.app_template_filter()
def format_datetime(value, format='medium'):
return value.strftime(os.environ.get('DATE_FORMAT', '%Y-%m-%d %H:%M')) # noqa: WPS323
@base.route('/')
def index():
return render_template('index.j2',