Mercurial > libervia-web
comparison server_side/blog.py @ 228:6efd189e8d78
server_side: put the blog entry content in its own span + CSS customization
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 08 Oct 2013 13:35:29 +0200 |
parents | b9edfa058786 |
children | e632f77c4219 |
comparison
equal
deleted
inserted
replaced
227:67e24c342e7f | 228:6efd189e8d78 |
---|---|
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_entry'><span class='mblog_timestamp'>%(date)s</span> |
88 <span class='mblog_content'>%(content)s</span></div>""" % { | |
88 'date':_datetime, | 89 'date':_datetime, |
89 'content':sanitizeHtml(entry['content']).encode('utf-8')}) | 90 'content':sanitizeHtml(entry['content']).encode('utf-8')}) |
90 request.write('</body></html>') | 91 request.write('</body></html>') |
91 request.finish() | 92 request.finish() |
92 | 93 |