fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adjust img width
[wolnelektury.git]
/
src
/
catalogue
/
models
/
book.py
diff --git
a/src/catalogue/models/book.py
b/src/catalogue/models/book.py
index
3811bba
..
d3e2a77
100644
(file)
--- a/
src/catalogue/models/book.py
+++ b/
src/catalogue/models/book.py
@@
-153,6
+153,9
@@
class Book(models.Model):
def language_name(self):
return dict(settings.LANGUAGES).get(self.language_code(), "")
def language_name(self):
return dict(settings.LANGUAGES).get(self.language_code(), "")
+ def is_foreign(self):
+ return self.language_code() != settings.LANGUAGE_CODE
+
def has_media(self, type_):
if type_ in Book.formats:
return bool(getattr(self, "%s_file" % type_))
def has_media(self, type_):
if type_ in Book.formats:
return bool(getattr(self, "%s_file" % type_))