Создал configuration_template, в котором, описаны данные, необходимые для работы сайта. Создал функцию создания задачи для проекта (пока не готова)
This commit is contained in:
parent
8e97e40c38
commit
a266eb363e
5
configuration_template
Normal file
5
configuration_template
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"mail_login": "<mail>",
|
||||||
|
"mail_password" : "<password>",
|
||||||
|
"encrypt_key": "<key>"
|
||||||
|
}
|
||||||
13
main.py
13
main.py
@ -49,6 +49,19 @@ def base():
|
|||||||
return redirect('/projects')
|
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'])
|
@app.route('/project/<int:id_project>/edit', methods=['GET', 'POST'])
|
||||||
def edit_project(id_project):
|
def edit_project(id_project):
|
||||||
if current_user.is_authenticated:
|
if current_user.is_authenticated:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user