コード例 #1
0
ファイル: app.py プロジェクト: hfilosa/Bloginator
def make_the_goddamn_comment():
    if request.method == "POST":
        theUname = int(post_data.findhuman(session['username']))
        thepostnum = int(session['post_id'])
        thecomment = request.form['thecomment']
        comments_data.addcomment(theUname, thepostnum, thecomment)
        session['comments'] = comments_data.findPost(session['post_id'])
    return redirect("/")
コード例 #2
0
ファイル: app.py プロジェクト: hfilosa/Bloginator
def make_the_goddamn_comment():
    if request.method == "POST":
        theUname = int(post_data.findhuman(session["username"]))
        thepostnum = int(session["post_id"])
        thecomment = request.form["thecomment"]
        comments_data.addcomment(theUname, thepostnum, thecomment)
        session["comments"] = comments_data.findPost(session["post_id"])
    return redirect("/")
コード例 #3
0
ファイル: app.py プロジェクト: hfilosa/Bloginator
def comment():
    if session["logged"] != True:
        return redirect("/login")
    session["in_comments"] = True
    session["comments"] = comments_data.findPost(int(request.form["post_id"]))
    print session["comments"]
    session["post_id"] = int(request.form["post_id"])
    session["comment_name"] = request.form["comment_name"]
    session["comment_text"] = request.form["comment_text"]
    return redirect("/")
コード例 #4
0
ファイル: app.py プロジェクト: hfilosa/Bloginator
def comment():
    if (session['logged'] != True):
        return redirect('/login')
    session['in_comments'] = True
    session['comments'] = comments_data.findPost(int(request.form['post_id']))
    print session['comments']
    session['post_id'] = int(request.form['post_id'])
    session['comment_name'] = request.form['comment_name']
    session['comment_text'] = request.form['comment_text']
    return redirect('/')