comparison server_side/blog.py @ 176:b9edfa058786

server side: fixed public blog items order
author Goffi <goffi@goffi.org>
date Mon, 14 Jan 2013 00:28:56 +0100
parents 764ca916e56e
children 6efd189e8d78
comparison
equal deleted inserted replaced
175:764ca916e56e 176:b9edfa058786
78 <title>%(user)s's microblog</title> 78 <title>%(user)s's microblog</title>
79 </head> 79 </head>
80 <body> 80 <body>
81 <div class='mblog_title'>%(user)s</div> 81 <div class='mblog_title'>%(user)s</div>
82 """ % {'user':user}) 82 """ % {'user':user})
83 mblog_data.reverse() 83 #mblog_data.reverse()
84 for entry in mblog_data: 84 for entry in mblog_data:
85 timestamp = float(entry.get('timestamp',0)) 85 timestamp = float(entry.get('timestamp',0))
86 _datetime = datetime.fromtimestamp(timestamp) 86 _datetime = datetime.fromtimestamp(timestamp)
87 request.write("<div class='mblog_content'><span class='mblog_timestamp'>%(date)s</span>%(content)s</div>" % { 87 request.write("<div class='mblog_content'><span class='mblog_timestamp'>%(date)s</span>%(content)s</div>" % {
88 'date':_datetime, 88 'date':_datetime,