Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.route("/secret")
- @fresh_login_required
- def secret():
- return render_template("secret.html")
- @app.route("/login", methods=["GET", "POST"])
- def login():
- <...login-checking code omitted...>
- if user_is_logged_in:
- flash("Logged in!")
- return redirect(request.args.get("next") or url_for("index"))
- else:
- flash("Sorry, but you could not log in.")
- return render_template("login.html")
- <form name="loginform" action="{{ url_for('login') }}" method="POST">
- Username: <input type="text" name="username" size="30" /><br />
- Password: <input type="password" name="password" size="30" /><br />
- <input type="submit" value="Login" /><br />
- <form name="loginform" action="{{ url_for('login') }}" method="POST">
- <form name="loginform" method="POST">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement