소스 검색

Correctly upload to task folder

https
jakobsn 6 년 전
부모
커밋
29fa7b9c64
1개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제
  1. +11
    -2
      src/app/models/project.py

+ 11
- 2
src/app/models/project.py 파일 보기

@@ -120,8 +120,8 @@ def set_task(projectid, task_title, task_description, budget):
"""
cursor = db.cursor()
query = ("INSERT INTO tasks (teamid, projectid, title, task_description, budget, task_status) VALUES (1, \"" +
projectid + "\", \"" + task_title + "\", \"" +
task_description + "\", \"" + budget + "\", \"waiting for delivery\")")
projectid + "\", \"" + task_title + "\", \"" +
task_description + "\", \"" + budget + "\", \"waiting for delivery\")")
cursor.execute(query)
db.commit()
cursor.close
@@ -140,3 +140,12 @@ def get_tasks_by_project_id(project_id):
tasks = cursor.fetchall()
cursor.close
return tasks

def set_task_file(task_id, filename):
cursor = db.cursor()
query = ("INSERT INTO task_files (taskid, filename) VALUES (\"" +
task_id + "\", \"" + filename + "\")")
cursor.execute(query)
db.commit()
cursor.close()

불러오는 중...
취소
저장