fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added complex books and organized books in folders.
[wolnelektury.git]
/
apps
/
catalogue
/
models.py
diff --git
a/apps/catalogue/models.py
b/apps/catalogue/models.py
index
f31dbe6
..
2a93873
100644
(file)
--- a/
apps/catalogue/models.py
+++ b/
apps/catalogue/models.py
@@
-166,7
+166,7
@@
class Book(models.Model):
book.tags = book_tags
if hasattr(book_info, 'parts'):
book.tags = book_tags
if hasattr(book_info, 'parts'):
- for
part_url, n
in enumerate(book_info.parts):
+ for
n, part_url
in enumerate(book_info.parts):
base, slug = part_url.rsplit('/', 1)
child_book = Book.objects.get(slug=slug)
child_book.parent = book
base, slug = part_url.rsplit('/', 1)
child_book = Book.objects.get(slug=slug)
child_book.parent = book