def change(): notes = [] for n, note in enumerate(DB.open_file()): if len(note): notes.append((n, note)) return render_template('change.html', notes=notes)
def read(): my_notes = [] for n, note in enumerate(DB.open_file()): if len(note): my_notes.append((n, note)) return render_template('index.html', notes=my_notes)