fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5136973
)
correct children order in API
author
Jan Szejko
<janek37@gmail.com>
Tue, 28 Nov 2017 09:49:39 +0000
(10:49 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Tue, 28 Nov 2017 09:49:39 +0000
(10:49 +0100)
src/api/handlers.py
patch
|
blob
|
history
diff --git
a/src/api/handlers.py
b/src/api/handlers.py
index
6f7179b
..
04c56f8
100644
(file)
--- a/
src/api/handlers.py
+++ b/
src/api/handlers.py
@@
-122,14
+122,12
@@
class BookDetails(object):
@classmethod
def url(cls, book):
""" Returns Book's URL on the site. """
-
return WL_BASE + book.get_absolute_url()
@classmethod
def children(cls, book):
""" Returns all children for a book. """
-
- return book.children.all()
+ return book.children.order_by('parent_number', 'sort_key')
@classmethod
def media(cls, book):