# HG changeset patch # User Marcin Kuzminski # Date 2010-09-22 04:31:21 # Node ID b4d9680cd164e53d0b947d147b4d427cb10a36b1 # Parent 2256c78afe53f725f91afbebf3e7ecbc7cc4021d some code fixes templates+helpers new rfc date without tz, added timerproxy formatting diff --git a/pylons_app/lib/helpers.py b/pylons_app/lib/helpers.py --- a/pylons_app/lib/helpers.py +++ b/pylons_app/lib/helpers.py @@ -325,6 +325,7 @@ isodate = lambda x: util.datestr(x, '%Y isodatesec = lambda x: util.datestr(x, '%Y-%m-%d %H:%M:%S %1%2') localdate = lambda x: (x[0], util.makedate()[1]) rfc822date = lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S %1%2") +rfc822date_notz = lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S") rfc3339date = lambda x: util.datestr(x, "%Y-%m-%dT%H:%M:%S%1:%2") time_ago = lambda x: util.datestr(_age(x), "%a, %d %b %Y %H:%M:%S %1%2") diff --git a/pylons_app/lib/timerproxy.py b/pylons_app/lib/timerproxy.py --- a/pylons_app/lib/timerproxy.py +++ b/pylons_app/lib/timerproxy.py @@ -21,6 +21,7 @@ def format_sql(sql): sql = sql.replace('\n', '') sql = one_space_trim(sql) sql = sql\ + .replace(',', ',\n\t')\ .replace('SELECT', '\n\tSELECT \n\t')\ .replace('UPDATE', '\n\tUPDATE \n\t')\ .replace('DELETE', '\n\tDELETE \n\t')\ diff --git a/pylons_app/templates/shortlog/shortlog_data.html b/pylons_app/templates/shortlog/shortlog_data.html --- a/pylons_app/templates/shortlog/shortlog_data.html +++ b/pylons_app/templates/shortlog/shortlog_data.html @@ -13,7 +13,7 @@ %for cnt,cs in enumerate(c.repo_changesets): - ${h.age(cs._ctx.date())} + ${h.age(cs._ctx.date())} - ${h.rfc822date_notz(cs._ctx.date())} ${h.person(cs.author)} r${cs.revision}:${cs.raw_id}