Docs: one link in "Login Exemple" is dead
See original GitHub issueIn index.rst there is a dead link
Login Example
=============
Once a user has authenticated, you log them in with the `login_user`
function.
For example:
.. code-block:: python
@app.route('/login', methods=['GET', 'POST'])
def login():
# Here we use a class of some kind to represent and validate our
# client-side form data. For example, WTForms is a library that will
# handle this for us, and we use a custom LoginForm to validate.
form = LoginForm()
if form.validate_on_submit():
# Login and validate the user.
# user should be an instance of your `User` class
login_user(user)
flask.flash('Logged in successfully.')
next = flask.request.args.get('next')
# is_safe_url should check if the url is safe for redirects.
# See http://flask.pocoo.org/snippets/62/ for an example.
if not is_safe_url(next):
return flask.abort(400)
return flask.redirect(next or flask.url_for('index'))
return flask.render_template('login.html', form=form)
The link http://flask.pocoo.org/snippets/62/
is not working.
Desktop (please complete the following information):
- OS: Linux mint
- Browser: Vivaldi (chrome based)
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Google Docs shared link requires login to edit document [closed]
The culprit is the invite=xyZFOO parameter in the URL. If it is deleted and the resulting URL opened, it works (the Docs is...
Read more >Submit a request regarding a deceased user's account
We cannot provide passwords or other login details. Any decision to satisfy a request about a deceased user will be made only after...
Read more >How to use google spreadsheets to check for broken links
Usually, this is a very simple task. All I would have to do is click the link in the URL column and see...
Read more >Sign In With Google JavaScript API reference | Authentication
This reference page describes the Sign-In JavaScript API. You can use this API to display the One Tap prompt or Sign In With...
Read more >25 incredibly useful Google Docs tips and tricks - Fast Company
(This one is also available in the Docs mobile apps; just look for the ... You can also add an image from your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Someone extracted an is_url_safe() from Django awhile back and packaged it up as a standalone PyPi project: https://pypi.org/project/is-safe-url It might be something to consider pointing at in the docs? https://gitlab.com/MarkusH/is_safe_url/-/blob/master/is_safe_url.py
Also, https://flask-login.readthedocs.io/en/latest/ hasn’t been updated with docs from 0.5.0.
Here’s the most recent archive from Wayback Machine. http://web.archive.org/web/20190524230221/http://flask.pocoo.org/snippets/62/
It looks like it’s not up to date with Python 3