mirror of https://github.com/pallets/flask.git
Add clarification for login_required decorator ref #313
This commit is contained in:
parent
aa9a994946
commit
434c19933e
|
|
@ -39,7 +39,12 @@ logged in::
|
|||
|
||||
So how would you use that decorator now? Apply it as innermost decorator
|
||||
to a view function. When applying further decorators, always remember
|
||||
that the :meth:`~flask.Flask.route` decorator is the outermost::
|
||||
that the :meth:`~flask.Flask.route` decorator is the outermost.
|
||||
|
||||
While the ``next`` value may exist in ``request.args`` after a ``GET`` request for
|
||||
the login form, you'll have to pass it along when sending the ``POST`` request
|
||||
from the login form. You can do this with a hidden input tag and ``requests.values``
|
||||
or ``requests.form``.::
|
||||
|
||||
@app.route('/secret_page')
|
||||
@login_required
|
||||
|
|
|
|||
Loading…
Reference in New Issue