From 288694ae9a61c59dba91e2357fa7785d95a51341 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 1 Jun 2020 18:34:00 +0200 Subject: forms --- cli/app/sql/models/graph.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cli/app/sql/models/graph.py') diff --git a/cli/app/sql/models/graph.py b/cli/app/sql/models/graph.py index 59d55c8..ef5a817 100644 --- a/cli/app/sql/models/graph.py +++ b/cli/app/sql/models/graph.py @@ -5,7 +5,6 @@ from wtforms_alchemy import ModelForm from app.sql.common import db, Base, Session -from app.utils.file_utils import sha256_tree from app.settings import app_cfg from os.path import join @@ -33,3 +32,10 @@ class Graph(Base): 'created_at': self.created_at, 'updated_at': self.updated_at, } + +class GraphForm(ModelForm): + class Meta: + model = Graph + exclude = ['settings', 'created_at', 'updated_at'] + def get_session(): + return Session() -- cgit v1.2.3-70-g09d2