diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-04-15 15:20:16 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-04-15 15:20:16 +0200 |
commit | fc40d7c22a54bf11b05b1e3e0015bc90530d66e8 (patch) | |
tree | b9a23e49858c2dadeeed9755539ad6353377f4da | |
parent | 53b004dc40944b919336906216511821c78bf7f5 (diff) |
Return unicode data from File.html().
-rw-r--r-- | db.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -52,7 +52,7 @@ class File(Base): return os.path.join(settings.file_directory, self.hash + os.path.splitext(self.filename)[1]) def html(self): - return '<a href="/f/{hash}/{filename}">{filename}</a> <sup><a href="/f/{hash}">1</a> <a href="/f/{hash}{ext}">2</a></sup> ({size}) on {date}'.format( + return u'<a href="/f/{hash}/{filename}">{filename}</a> <sup><a href="/f/{hash}">1</a> <a href="/f/{hash}{ext}">2</a></sup> ({size}) on {date}'.format( hash = self.hash, filename = self.filename, ext = os.path.splitext(self.filename)[1], size = self.pretty_size(os.path.getsize(self.get_path())), date = self.date.strftime('%Y-%m-%d %H:%M:%S UTC')) |