@@ -46,7 +46,6 @@ class Page(Group):
def __init__(self):
self.view = jp.WebPage(delete_flag=False, body_classes='m-4', title='Nice GUI')
- jp.justpy(lambda: self.view, start_server=False)
class Column(Group):
@@ -1,10 +1,14 @@
import justpy as jp
-from elements import Page
+from elements import Column, Page
-main = Page()
+page = Page()
+content = Column(page.view)
+
+jp.justpy(lambda: page.view, start_server=False)
ui = jp.app
# bind methods to simplify API -- justpy creates an app which must be found by uvicorn via string "module:attribute"
-for field in dir(main):
- if field[0] != '_' and callable(attr := getattr(main, field)):
+for field in dir(content):
+ if field[0] != '_' and callable(attr := getattr(content, field)):
setattr(ui, field, attr)
+ui.timer = page.timer