def note_list(): note = Note() df = note.get_deta() note_list = df p = re.compile(r"<[^>]*?>") q = re for a in note_list: a["body"] = p.sub("", a["body"]).replace(" ", "") a["publishAt"] = re.sub("-", "/", a["publishAt"]) return render_template('note.html', note_list=note_list,)
def index(): index = "index" note = Note() df = note.get_deta() note_list = df[0:3] p = re.compile(r"<[^>]*?>") q = re for a in note_list: a["body"] = p.sub("", a["body"]).replace(" ", "") a["publishAt"] = re.sub("-", "/", a["publishAt"]) return render_template('index.html', note_list=note_list, index=index)