fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c7c8dfb
)
Added unicode conversions back (they were necessary after all).
author
Marek Stępniowski
<marek@stepniowski.com>
Tue, 9 Sep 2008 13:15:00 +0000
(15:15 +0200)
committer
Marek Stępniowski
<marek@stepniowski.com>
Tue, 9 Sep 2008 13:15:00 +0000
(15:15 +0200)
apps/catalogue/models.py
patch
|
blob
|
history
diff --git
a/apps/catalogue/models.py
b/apps/catalogue/models.py
index
feccaed
..
db91190
100644
(file)
--- a/
apps/catalogue/models.py
+++ b/
apps/catalogue/models.py
@@
-102,8
+102,8
@@
class Book(models.Model):
if self.odt_file:
formats.append(u'<a href="%s">Plik ODT</a>' % self.odt_file.url)
if self.odt_file:
formats.append(u'<a href="%s">Plik ODT</a>' % self.odt_file.url)
- self._short_html = render_to_string('catalogue/book_short.html',
- {'book': self, 'tags': tags, 'formats': formats})
+ self._short_html =
unicode(
render_to_string('catalogue/book_short.html',
+ {'book': self, 'tags': tags, 'formats': formats})
)
self.save()
return mark_safe(self._short_html)
self.save()
return mark_safe(self._short_html)
@@
-221,8
+221,8
@@
class Fragment(models.Model):
book_authors = [u'<a href="%s">%s</a>' % (tag.get_absolute_url(), tag.name)
for tag in self.book.tags if tag.category == 'author']
book_authors = [u'<a href="%s">%s</a>' % (tag.get_absolute_url(), tag.name)
for tag in self.book.tags if tag.category == 'author']
- self._short_html = render_to_string('catalogue/fragment_short.html',
- {'fragment': self, 'book': self.book, 'book_authors': book_authors})
+ self._short_html =
unicode(
render_to_string('catalogue/fragment_short.html',
+ {'fragment': self, 'book': self.book, 'book_authors': book_authors})
)
self.save()
return mark_safe(self._short_html)
self.save()
return mark_safe(self._short_html)