fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More work on new HTML reader.
[wolnelektury.git]
/
apps
/
catalogue
/
models
/
book.py
diff --git
a/apps/catalogue/models/book.py
b/apps/catalogue/models/book.py
index
3cab676
..
b17d293
100644
(file)
--- a/
apps/catalogue/models/book.py
+++ b/
apps/catalogue/models/book.py
@@
-95,6
+95,12
@@
class Book(models.Model):
def name(self):
return self.title
def name(self):
return self.title
+ def language_code(self):
+ return constants.LANGUAGES_3TO2.get(self.language, self.language)
+
+ def language_name(self):
+ return dict(settings.LANGUAGES).get(self.language_code(), "")
+
def book_tag_slug(self):
return ('l-' + self.slug)[:120]
def book_tag_slug(self):
return ('l-' + self.slug)[:120]