fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some css tweaks to download popup and logo/tagline shifted right a bit
[wolnelektury.git]
/
apps
/
catalogue
/
models.py
diff --git
a/apps/catalogue/models.py
b/apps/catalogue/models.py
index
2effb3b
..
e4cd8c4
100644
(file)
--- a/
apps/catalogue/models.py
+++ b/
apps/catalogue/models.py
@@
-510,16
+510,12
@@
class Book(models.Model):
tags = self.tags.filter(category__in=('author', 'kind', 'genre', 'epoch'))
tags = split_tags(tags)
tags = self.tags.filter(category__in=('author', 'kind', 'genre', 'epoch'))
tags = split_tags(tags)
- formats =
[]
+ formats =
{}
# files generated during publication
for ebook_format in self.ebook_formats:
if self.has_media(ebook_format):
# files generated during publication
for ebook_format in self.ebook_formats:
if self.has_media(ebook_format):
- formats.append(u'<a href="%s">%s</a>' % (
- self.get_media(ebook_format).url,
- ebook_format.upper()
- ))
+ formats[ebook_format] = self.get_media(ebook_format)
- formats = [mark_safe(format) for format in formats]
short_html = unicode(render_to_string('catalogue/book_short.html',
{'book': self, 'tags': tags, 'formats': formats}))
short_html = unicode(render_to_string('catalogue/book_short.html',
{'book': self, 'tags': tags, 'formats': formats}))