comparison index_app.py @ 50:92e7bc3c5755

sort entries on index.php by LastMod date, descending order
author paulo
date Tue, 12 Mar 2013 22:42:13 -0600
parents 50de1845520f
children 0fbe37b56e84
comparison
equal deleted inserted replaced
0:7a74a69b996a 1:4a60cd7041dc
40 header.link(rel="stylesheet", type="text/css", href="index.css") 40 header.link(rel="stylesheet", type="text/css", href="index.css")
41 41
42 body = root.body 42 body = root.body
43 body.h1(TITLE_FMT % str(_get_breadcrumb(cwd)), escape=False) 43 body.h1(TITLE_FMT % str(_get_breadcrumb(cwd)), escape=False)
44 44
45 body_table = body.table 45 body_table = body.table(klass="index")
46 46
47 for (i, modeok, mtime) in sorted(dirs, key=lambda x: x[2], reverse=True): 47 for (i, modeok, mtime) in sorted(dirs, key=lambda x: x[2], reverse=True):
48 if modeok: 48 if modeok:
49 r = body_table.tr 49 r = body_table.tr
50 r.td.div(mtime.isoformat(), klass="index_date") 50 r.td.div(mtime.isoformat(), klass="index_date")