Students Record School Grading System
Students | Subjects | Instructor | Score Sheet
See Student Record
Back to home
Id | Surname | Othernames | Address |
---|---|---|---|
{{rec[0]}} | {{rec[1]}} | {{rec[2]}} | {{rec[3]}} |
from flask import Flask, render_template, request import sqlite3, os app = Flask(__name__) #get the current path name our app dir_path = os.path.dirname(os.path.realpath(__file__)) #create and connect to the database in our current folder conn = sqlite3.connect(dir_path+'/tealearn_grades.db', check_same_thread=False) #..... #view students record @app.route('/seestudents') def seestudents(): cursor = conn.cursor() cursor.execute('SELECT * FROM student') data = cursor.fetchall() return render_template('seestudents.html', students=data) #..... if __name__ == '__main__': app.run(debug=True)
No Comment yet!