Mercurial > libervia-web
changeset 1380:df79874947d7
pages: fix browser data re-creation on dev mode reload
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 20 Feb 2021 13:51:11 +0100 |
parents | 4c51f22a813a |
children | a53e22400dad |
files | libervia/server/pages.py |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/server/pages.py Sat Feb 20 13:49:08 2021 +0100 +++ b/libervia/server/pages.py Sat Feb 20 13:51:11 2021 +0100 @@ -520,6 +520,17 @@ del parent.children[url_elt] # we can now add the new page parent.putChild(url_elt, resource) + + # is there any browser data to create? + browser_path = resource.root_dir / C.PAGES_BROWSER_DIR + if browser_path.is_dir(): + cls.createBrowserData( + resource.vhost_root, + resource, + browser_path, + resource.url.split('/') + ) + if new_page: log.info(_("{page} created").format(page=resource)) else: