Mercurial > libervia-web
comparison libervia/server/server.py @ 1514:16228994ca3b
server: fix hot reloading of modules in dev mode
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 22 May 2023 11:57:49 +0200 |
parents | 65e063657597 |
children | a3ca1bab6eb1 |
comparison
equal
deleted
inserted
replaced
1513:ff95501abe74 | 1514:16228994ca3b |
---|---|
529 | 529 |
530 if self.options['dev-mode']: | 530 if self.options['dev-mode']: |
531 self.files_watcher.watch_dir( | 531 self.files_watcher.watch_dir( |
532 site_path, auto_add=True, recursive=True, | 532 site_path, auto_add=True, recursive=True, |
533 callback=LiberviaPage.on_file_change, site_root=res, | 533 callback=LiberviaPage.on_file_change, site_root=res, |
534 site_path=site_path) | 534 # FIXME: site_path should always be a Path, check code above and |
535 # in template module | |
536 site_path=Path(site_path)) | |
535 | 537 |
536 LiberviaPage.import_pages(self, res) | 538 LiberviaPage.import_pages(self, res) |
537 # FIXME: default pages are accessible if not overriden by external website | 539 # FIXME: default pages are accessible if not overriden by external website |
538 # while necessary for login or re-using existing pages | 540 # while necessary for login or re-using existing pages |
539 # we may want to disable access to the page by direct URL | 541 # we may want to disable access to the page by direct URL |