Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <title>Flask Message flashing</title>
- </head>
- <body>
- {% with messages = get_flashed_messages() %}
- {% if messages %}
- <ul>
- {% for message in messages %}
- <li<{{ message }}</li>
- {% endfor %}
- </ul>
- {% endif %}
- {% endwith %}
- <h1>Login?</h1>
- <p>Do you want to <a href = "{{ url_for('login') }}">
- <b>log in?</b></a></p>
- </body>
- </html>
- ----------------------------------------
- <!doctype html>
- <html>
- <body>
- <h1>Login</h1>
- {% if error %}
- <p><strong>Error:</strong> {{ error }}
- {% endif %}
- <form action = "" method = post>
- <dl>
- <dt>Username:</dt>
- <dd>
- <input type = text name = username
- value = "{{request.form.username }}">
- </dd>
- <dt>Password:</dt>
- <dd><input type = password name = password></dd>
- </dl>
- <p><input type = submit value = Login></p>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement