Пример #1
0
def home():
    if current_user.is_anonymous:
        page = request.args.get("page", 1, type=int)
        books = Books.get_paginated(page=page)
        return render_template("pages/home.html",
                               form=SignupForm(request.form),
                               books=books)
    else:
        return redirect(url_for("profile"))
Пример #2
0
def explore():
    page = request.args.get("page", 1, type=int)
    books = Books.get_paginated(page=page)
    return render_template("pages/home.html",
                           form=SignupForm(request.form),
                           books=books)