From a266eb363ef380666b1de14b65eebad15c5fd03d Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 13 Feb 2023 20:33:03 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB=20configur?= =?UTF-8?q?ation=5Ftemplate,=20=D0=B2=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=BC,=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D0=B5,=20=D0=BD=D0=B5=D0=BE?= =?UTF-8?q?=D0=B1=D1=85=D0=BE=D0=B4=D0=B8=D0=BC=D1=8B=D0=B5=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D1=81=D0=B0?= =?UTF-8?q?=D0=B9=D1=82=D0=B0.=20=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB=20?= =?UTF-8?q?=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8E=20=D1=81=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87?= =?UTF-8?q?=D0=B8=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=B0=20(=D0=BF=D0=BE=D0=BA=D0=B0=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configuration_template | 5 +++++ main.py | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 configuration_template diff --git a/configuration_template b/configuration_template new file mode 100644 index 0000000..089748c --- /dev/null +++ b/configuration_template @@ -0,0 +1,5 @@ +{ +"mail_login": "", +"mail_password" : "", +"encrypt_key": "" +} \ No newline at end of file diff --git a/main.py b/main.py index 575d75b..d5db8ea 100644 --- a/main.py +++ b/main.py @@ -49,6 +49,19 @@ def base(): return redirect('/projects') +@app.route('/project//task/new') +def new_task_project(id_project): + if current_user.is_authenticated: + data_session = db_session.create_session() + current_project = data_session.query(Projects).filter(Projects.id == id_project).first() + if current_project: + pass + else: + abort(404) + else: + return redirect('/login') + + @app.route('/project//edit', methods=['GET', 'POST']) def edit_project(id_project): if current_user.is_authenticated: