Skip to content

Commit

Permalink
update template filter for strftime
Browse files Browse the repository at this point in the history
  • Loading branch information
jirivrany committed Apr 4, 2024
1 parent fa8ce17 commit 9f32ac0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion flowapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ def inject_dashboard():

@app.template_filter("strftime")
def format_datetime(value):
if value is None:
return app.config.get("MISSING_DATETIME_MESSAGE", "Never")

format = "y/MM/dd HH:mm"

return babel.dates.format_datetime(value, format)

def _register_user_to_session(uuid: str):
Expand Down
2 changes: 0 additions & 2 deletions flowapp/views/api_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def add():
form = ApiKeyForm(request.form, key=generated)

if request.method == "POST" and form.validate():
print("Form validated")
# import ipdb; ipdb.set_trace()
model = ApiKey(
machine=form.machine.data,
key=form.key.data,
Expand Down

0 comments on commit 9f32ac0

Please sign in to comment.