comparison src/server/server.py @ 990:6daa59d44ee2

pages: menu implementation, first draft: menu can now be specified in sat.conf using menu_json setting and using pages' names. A default menu is set in constants, with only login and blog pages for now.
author Goffi <goffi@goffi.org>
date Fri, 01 Dec 2017 00:02:34 +0100
parents 64826e69f365
children f88325b56a6a
comparison
equal deleted inserted replaced
989:1d1a6c91961f 990:6daa59d44ee2
1451 # static pages 1451 # static pages
1452 self.putChild('blog', MicroBlog(self)) 1452 self.putChild('blog', MicroBlog(self))
1453 self.putChild(C.THEMES_URL, ProtectedFile(self.themes_dir)) 1453 self.putChild(C.THEMES_URL, ProtectedFile(self.themes_dir))
1454 1454
1455 LiberviaPage.importPages(self) 1455 LiberviaPage.importPages(self)
1456 LiberviaPage.setMenu(self.options['menu_json'])
1456 self.bridge.register_signal("psEventRaw", partial(LiberviaPage.onNodeEvent, self), "plugin") 1457 self.bridge.register_signal("psEventRaw", partial(LiberviaPage.onNodeEvent, self), "plugin")
1457 1458
1458 # media dirs 1459 # media dirs
1459 # FIXME: get rid of dirname and "/" in C.XXX_DIR 1460 # FIXME: get rid of dirname and "/" in C.XXX_DIR
1460 self.putChild(os.path.dirname(C.MEDIA_DIR), ProtectedFile(self.media_dir)) 1461 self.putChild(os.path.dirname(C.MEDIA_DIR), ProtectedFile(self.media_dir))