예제 #1
0
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)
예제 #2
0
def back():
    titles = utils.returnAllStories()
    return home()