fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove extrenal librarian from tags.
[wolnelektury.git]
/
apps
/
catalogue
/
utils.py
diff --git
a/apps/catalogue/utils.py
b/apps/catalogue/utils.py
index
3ffe9c0
..
acbd778
100644
(file)
--- a/
apps/catalogue/utils.py
+++ b/
apps/catalogue/utils.py
@@
-66,11
+66,12
@@
class ORMDocProvider(DocProvider):
def __init__(self, book):
self.book = book
def __init__(self, book):
self.book = book
- def by_slug
(self, slug
):
- if slug == self.book.slug:
- return
self.book.xml_file
+ def by_slug
_and_lang(self, slug, language
):
+ if slug == self.book.slug
and language == self.language
:
+ return
open(self.book.xml_file.path)
else:
else:
- return type(self.book).objects.get(slug=slug).xml_file
+ return type(self.book).objects.get(
+ slug=slug, language=language).xml_file
class LockFile(object):
class LockFile(object):