def home(): titles = utils.returnAllStories() if request.method == 'POST': button = request.form['button'] if button == 'Read': title = request.form["titleselect"] return readStory(title) if button == "Write": WriteNewTitle = request.form["newtitle"] utils.newStory(WriteNewTitle) titles = utils.returnAllStories() return render_template("home.html", titles = titles) else: return render_template("home.html", titles = titles)
def back(): titles = utils.returnAllStories() return home()