Пример #1
0
def userpage():
    if session["logged"]==0:
        return redirect(url_for("login"))
    else:
        return render_template("userpage.html",
        uname=database.get_user_by_id(session["user"]),
        posts=reversed(database.get_top_posts(-1)),
        yourposts=database.get_top_posts(session["user"]))
Пример #2
0
def story():
    if session["logged"]==0:
        return redirect(url_for("login"))
    return render_template("story.html",
        title="POSTS", author="",
        posts=database.get_top_posts(-1),
        uname=database.get_user_by_id(session["user"]),
        storyid=request.args.get('storyid'),
        content=database.get_story_content(request.args.get('storyid')))