Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -544,9 +544,7 @@ def result():
|
|
544 |
if 'email' not in session:
|
545 |
return redirect(url_for('home'))
|
546 |
|
547 |
-
|
548 |
-
|
549 |
-
app.config['MYSQL_DB'] = 'test'
|
550 |
curr = mysql.cursor()
|
551 |
|
552 |
curr.execute("SELECT * FROM `custom` WHERE id=%s AND type=%s", (session['id'], session['type'],))
|
@@ -703,7 +701,6 @@ def result():
|
|
703 |
|
704 |
suggest_dict = dict(sorted(result_dict.items()))
|
705 |
|
706 |
-
print('test2')
|
707 |
curr.execute(
|
708 |
"SELECT `Questions`,`response`, `result`, `datetime` FROM `custom`, `assessments` WHERE `id`=%s AND `type`=%s AND custom.type = assessments.assessId",
|
709 |
(session['id'], session['type'],))
|
@@ -712,7 +709,6 @@ def result():
|
|
712 |
mysql.commit()
|
713 |
curr.close()
|
714 |
|
715 |
-
print('test3')
|
716 |
return render_template("result.html", ques=ques, res1=res[3], res2=res[4], res3=res[6], res4=res[5], res5=dyna, res6=response, res7=suggest_dict, res8=questions, res9=details)
|
717 |
|
718 |
|
|
|
544 |
if 'email' not in session:
|
545 |
return redirect(url_for('home'))
|
546 |
|
547 |
+
app.config['MYSQL_DB'] = 'sql12660485'
|
|
|
|
|
548 |
curr = mysql.cursor()
|
549 |
|
550 |
curr.execute("SELECT * FROM `custom` WHERE id=%s AND type=%s", (session['id'], session['type'],))
|
|
|
701 |
|
702 |
suggest_dict = dict(sorted(result_dict.items()))
|
703 |
|
|
|
704 |
curr.execute(
|
705 |
"SELECT `Questions`,`response`, `result`, `datetime` FROM `custom`, `assessments` WHERE `id`=%s AND `type`=%s AND custom.type = assessments.assessId",
|
706 |
(session['id'], session['type'],))
|
|
|
709 |
mysql.commit()
|
710 |
curr.close()
|
711 |
|
|
|
712 |
return render_template("result.html", ques=ques, res1=res[3], res2=res[4], res3=res[6], res4=res[5], res5=dyna, res6=response, res7=suggest_dict, res8=questions, res9=details)
|
713 |
|
714 |
|