From: Oleg Broytman Date: Tue, 20 May 2014 14:23:40 +0000 (+0400) Subject: Return y/m/d X-Git-Tag: v0.1~3 X-Git-Url: https://git.phdru.name/?p=phdru.name%2Fcgi-bin%2Fblog-ru%2Fsearch-tags.git;a=commitdiff_plain;h=3d1095e88653ea5e0c999ba65ad6406163ecc447 Return y/m/d --- diff --git a/tags.py b/tags.py index e1d5dd1..dec8898 100644 --- a/tags.py +++ b/tags.py @@ -59,7 +59,8 @@ def find_tags(tree): for post in posts: if _test_post(post, tree): _posts.append(( - '/'.join((year, month, day, post[0].replace('.tmpl', '.html'))), + year, month, day, + '/'.join((year, month, day, post[0][:-len("tmpl")] + "html")), post[1])) _posts.sort(reverse=True) return _posts