mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 08:16:51 -04:00
Put data from job on job page
The main change is showing the finished time if the job is finished, rather than the start time.
This commit is contained in:
@@ -73,6 +73,7 @@ def create_app(config_name, config_overrides=None):
|
||||
|
||||
application.add_template_filter(nl2br)
|
||||
application.add_template_filter(format_datetime)
|
||||
application.add_template_filter(format_time)
|
||||
application.add_template_filter(syntax_highlight_json)
|
||||
application.add_template_filter(valid_phone_number)
|
||||
|
||||
@@ -149,6 +150,12 @@ def format_datetime(date):
|
||||
return native.strftime('%A %d %B %Y at %H:%M')
|
||||
|
||||
|
||||
def format_time(date):
|
||||
date = dateutil.parser.parse(date)
|
||||
native = date.replace(tzinfo=None)
|
||||
return native.strftime('%H:%M')
|
||||
|
||||
|
||||
def valid_phone_number(phone_number):
|
||||
try:
|
||||
validate_phone_number(phone_number)
|
||||
|
||||
Reference in New Issue
Block a user