view pylons_app/lib/filters.py @ 74:cdf4fda66dd9

Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
author Marcin Kuzminski <marcin@python-blog.com>
date Mon, 12 Apr 2010 10:29:18 +0200
parents
children 928416088790
line wrap: on
line source

from mercurial import util

capitalize = lambda x: x.capitalize()
date = lambda x: util.datestr(x)
email = util.email
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 context, 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")