Mercurial > kallithea
diff pylons_app/lib/filters.py @ 83:db39d0ca5308
implemented Shortlog as seperate controller,
filters rewrite. Little html fixes
author | Marcin Kuzminski <marcin@python-blog.com> |
---|---|
date | Sun, 18 Apr 2010 11:23:10 +0200 |
parents | 928416088790 |
children | 9f6300b96380 |
line wrap: on
line diff
--- a/pylons_app/lib/filters.py Sun Apr 18 00:31:58 2010 +0200 +++ b/pylons_app/lib/filters.py Sun Apr 18 11:23:10 2010 +0200 @@ -1,14 +1,15 @@ from mercurial import util -from mercurial.templatefilters import age as _age +from mercurial.templatefilters import age as _age, person as _person -age = lambda context, x:_age(x) +age = lambda x:_age(x) capitalize = lambda x: x.capitalize() date = lambda x: util.datestr(x) email = util.email -hgdate = lambda context, x: "%d %d" % x -isodate = lambda context, x: util.datestr(x, '%Y-%m-%d %H:%M %1%2') -isodatesec = lambda context, x: util.datestr(x, '%Y-%m-%d %H:%M:%S %1%2') -localdate = lambda context, x: (x[0], util.makedate()[1]) -rfc822date = lambda context, x: util.datestr(x, "%a, %d %b %Y %H:%M:%S %1%2") -rfc3339date = lambda context, x: util.datestr(x, "%Y-%m-%dT%H:%M:%S%1:%2") -time_ago = lambda context, x: util.datestr(_age(x), "%a, %d %b %Y %H:%M:%S %1%2") +person = lambda x: _person(x) +hgdate = lambda x: "%d %d" % x +isodate = lambda x: util.datestr(x, '%Y-%m-%d %H:%M %1%2') +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") +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")