Создал configuration_template, в котором, описаны данные, необходимые для работы сайта. Создал функцию создания задачи для проекта (пока не готова)

This commit is contained in:
Andrei 2023-02-13 20:33:03 +05:00
parent 8e97e40c38
commit a266eb363e
2 changed files with 18 additions and 0 deletions

5
configuration_template Normal file
View File

@ -0,0 +1,5 @@
{
"mail_login": "<mail>",
"mail_password" : "<password>",
"encrypt_key": "<key>"
}

13
main.py
View File

@ -49,6 +49,19 @@ def base():
return redirect('/projects')
@app.route('/project/<int:id_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/<int:id_project>/edit', methods=['GET', 'POST'])
def edit_project(id_project):
if current_user.is_authenticated: