From 7eab18f839616140fe3dbc4b51e29ec903c48077 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 2 Jun 2020 20:41:58 +0200 Subject: adding les pages --- cli/app/controllers/page_controller.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/app/controllers/page_controller.py') diff --git a/cli/app/controllers/page_controller.py b/cli/app/controllers/page_controller.py index 1f53171..41d30f3 100644 --- a/cli/app/controllers/page_controller.py +++ b/cli/app/controllers/page_controller.py @@ -17,5 +17,12 @@ class PageView(CrudView): query = query.filter(Page.graph_id == int(graph_id)) return query + def on_create(self, session, form, item): + item.settings = form['settings'] + item.graph_id = int(form['graph_id']) + + def on_update(self, session, form, item): + item.settings = form['settings'] + def on_destroy(self, session, item): session.query(Tile).filter(Tile.page_id == item.id).delete(synchronize_session=False) -- cgit v1.2.3-70-g09d2