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:
Chris Hill-Scott
2016-03-02 16:15:15 +00:00
parent 3a3e4258ef
commit d9073862fa
6 changed files with 77 additions and 31 deletions

View File

@@ -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)