def get_course(): name = db.course.find_one() if name is None: print('No data!') courses = proComments.course() _id = db.course.insert_many(courses) print(_id) else: print('getting course data') name = [] for cours in db.course.find(): name.append(cours) print(name) return name
def home(): details = proComments.details() students = proComments.course() print(students) return render_template('index.html', posts=[students, details]) # render a template