Skip to content

Commit

Permalink
Add defaults, sections not needed in frontpage.json
Browse files Browse the repository at this point in the history
  • Loading branch information
dbdean committed Sep 4, 2017
1 parent 2ee6cea commit 45b8670
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nbviewer/frontpage.schema.json
Expand Up @@ -29,5 +29,5 @@
}
}
},
"required": ["title", "sections"]
"required": ["title"]
}
6 changes: 3 additions & 3 deletions nbviewer/handlers.py
Expand Up @@ -35,10 +35,10 @@ class IndexHandler(BaseHandler):
def get(self):
self.finish(self.render_template(
'index.html',
sections=self.frontpage_setup['sections'],
title=self.frontpage_setup['title'],
subtitle=self.frontpage_setup['subtitle'],
show_input=self.frontpage_setup['show_input']))
subtitle=self.frontpage_setup.get('subtitle', None),
show_input=self.frontpage_setup.get('show_input', True),
sections=self.frontpage_setup.get('sections', [])))


class FAQHandler(BaseHandler):
Expand Down

0 comments on commit 45b8670

Please sign in to comment.