def display(): from models import Subjects try: inserted = Subjects.insert(request.form['subjectCode'], request.form['term'], request.form['subjectType'], request.form['subjectName']) except: print("Empty fields") result = Subjects.select(all=True) return render_template("database.html", result=result)
def subjectsTable(): try: inserted = Subjects.insert( request.form['subjectCode'], request.form['term'], request.form['subjectType'], request.form['subjectName']) except: print("Empty fields") allSubjects = Subjects.select(all=True) return render_template("subjectsTable.html", allSubjects=allSubjects)