equal
deleted
inserted
replaced
88 return '%s ago' % fmt(t, n, a) |
88 return '%s ago' % fmt(t, n, a) |
89 |
89 |
90 @templatefilter('basename') |
90 @templatefilter('basename') |
91 def basename(path): |
91 def basename(path): |
92 """Any text. Treats the text as a path, and returns the last |
92 """Any text. Treats the text as a path, and returns the last |
93 component of the path after splitting by the path separator |
93 component of the path after splitting by the path separator. |
94 (ignoring trailing separators). For example, "foo/bar/baz" becomes |
94 For example, "foo/bar/baz" becomes "baz" and "foo/bar//" becomes "". |
95 "baz" and "foo/bar//" becomes "bar". |
|
96 """ |
95 """ |
97 return os.path.basename(path) |
96 return os.path.basename(path) |
98 |
97 |
99 @templatefilter('count') |
98 @templatefilter('count') |
100 def count(i): |
99 def count(i): |