doing updating UI, adding jinja filters
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
|
||||
from flask import Flask
|
||||
from datetime import datetime
|
||||
|
||||
def create_app(test_config=None):
|
||||
app = Flask(__name__, instance_relative_config=True)
|
||||
@@ -19,6 +20,10 @@ def create_app(test_config=None):
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
@app.template_filter('format_datetime')
|
||||
def format_datetime(value, format):
|
||||
return datetime.strptime(value, "%Y-%m-%d %H:%M:%S").strftime(format)
|
||||
|
||||
from . import db
|
||||
db.init_app(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user