mirror of
https://github.com/nikdoof/ohayodash.git
synced 2025-12-18 12:29:21 +00:00
Make the date format user configurable
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user