##// END OF EJS Templates
Moved cached function for easier invalidation
Moved cached function for easier invalidation

File last commit:

r87:9f6300b9 default
r134:79a4f9f1 default
Show More
filters.py
23 lines | 895 B | text/x-python | PythonLexer
Marcin Kuzminski
Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
r74 from mercurial import util
Marcin Kuzminski
implemented Shortlog as seperate controller,...
r83 from mercurial.templatefilters import age as _age, person as _person
Marcin Kuzminski
Updated error handling, from mercurial to pylons. + added tempalte for 404
r87 from string import punctuation
def clean_repo(repo_name):
for x in punctuation:
if x != '_':
repo_name = repo_name.replace(x, '')
repo_name = repo_name.lower().strip()
return repo_name.replace(' ', '_')
Marcin Kuzminski
Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
r74
Marcin Kuzminski
implemented Shortlog as seperate controller,...
r83 age = lambda x:_age(x)
Marcin Kuzminski
Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
r74 capitalize = lambda x: x.capitalize()
date = lambda x: util.datestr(x)
email = util.email
Marcin Kuzminski
implemented Shortlog as seperate controller,...
r83 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")