def dynamicprj(project_name):
    cur = mydb.cursor()
    cur.execute("select Distinct Task_Type from webappdata.Task_Type order by Task_Type")
    tasktypes = cur.fetchall()
    cur.execute("select ID, PROJECT_NAME, TASK_TYPE, TASK_TITTLE, TASK_DESC, TASK_PROGRESS from webappdata.Task where project_name = %s",(project_name,))
    task_list = cur.fetchall()
    if request.method == 'POST':
        status = request.form['taskprogerss']
        cur = mydb.cursor()
        cur.execute("INSERT INTO WEBAPPDATA.TASK(TASK_PROGRESS) VALUES(%s)",(status))
        mydb.commit()
    return render_template('dynamic_project.html', projectname=project_name,tasktypes=tasktypes, tasklist=task_list)
Esempio n. 2
0
def home():
    cur = mydb.cursor()
    cur.execute("select * from webappdata.projects")
    userdetails = cur.fetchall()
    if len(userdetails) > 0:
        return render_template('users.html', userdetails=userdetails)
    else:
        return render_template('users.html', userdetails='None')
def dynamictask(project_name,task_name):
    if request.method == 'POST':
        regdetails = request.form
        tittle = regdetails['Tittle']
        desc = regdetails['Desc']
        ins_dt = datetime.now()
        cur = mydb.cursor()
        cur.execute("INSERT INTO WEBAPPDATA.TASK(PROJECT_NAME, TASK_TYPE, TASK_TITTLE, TASK_DESC, TASK_CREATED_DT, TASK_UPDATED_DT) VALUES(%s,%s,%s,%s,%s,%s)",(project_name, task_name, tittle, desc, ins_dt, ins_dt))
        mydb.commit()
        return redirect(url_for("dyprj_bp.dynamicprj",project_name=project_name))
    return render_template('Create_task.html', projectname=project_name,taskname=task_name)
Esempio n. 4
0
def projects():
    if request.method == 'POST':            
            regdetails = request.form
            projectname = regdetails['Project_name']
            projectdesc = regdetails['Project_desc']
            prj_create_dt = datetime.now()
            cur = mydb.cursor()
            cur.execute("INSERT INTO webappdata.projects(PROJECT_NAME, PROJECT_DESC, PROJECT_CREATED_DATE) values(%s, %s, %s)",(projectname, projectdesc, prj_create_dt))
            mydb.commit()
            return redirect(url_for('login_bp.home'))
    return render_template('create_project.html')
Esempio n. 5
0
def register():
    if request.method == 'POST':
        regdetails = request.form
        fname = regdetails['firstname']
        lname = regdetails['lastname']
        email = regdetails['email']
        username = regdetails['username']
        password = regdetails['password']
        ins_date = datetime.now()
        cur = mydb.cursor()
        cur.execute(
            "INSERT INTO webappdata.users(FNAME, LNAME, EMAIL, USERNAME, PASSWORD, INSERT_DATE, UPDATE_DATE) values(%s, %s, %s, %s, %s, %s, %s)",
            (fname, lname, email, username, password, ins_date, ins_date))
        mydb.commit()
        return redirect(url_for("login_bp.home"))
    return render_template('register.html')