Exemplo n.º 1
0
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,)
Exemplo n.º 2
0
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)