Commit f80e9cf5 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Better coding

parent 9311bd18
......@@ -69,8 +69,9 @@ class HomePage:
chapters = []
for nbfile in self.nbdir.glob('*-*.ipynb'):
chapter = self._get_chapter(nbfile)
chapter['preview_only'] = True if chapter['number'] \
in config['chapter_preview_only'] else False
chapter['preview_only'] = chapter['number'] in \
config['chapter_preview_only']
chapters.append(chapter)
chapters.sort(key=lambda chapter: chapter['number'])
self.variables.update({'chapters': chapters})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment