Update views.rst
This commit is contained in:
parent
2c7f57ad5b
commit
89055bb091
1 changed files with 2 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ write templates to generate the HTML form.
|
|||
.. code-block:: python
|
||||
:caption: ``flaskr/auth.py``
|
||||
|
||||
@bp.route('/register', methods=('GET', 'POST'))
|
||||
@bp.route('/register', methods=['GET', 'POST'])
|
||||
def register():
|
||||
if request.method == 'POST':
|
||||
username = request.form['username']
|
||||
|
|
@ -170,7 +170,7 @@ This view follows the same pattern as the ``register`` view above.
|
|||
.. code-block:: python
|
||||
:caption: ``flaskr/auth.py``
|
||||
|
||||
@bp.route('/login', methods=('GET', 'POST'))
|
||||
@bp.route('/login', methods=['GET', 'POST'])
|
||||
def login():
|
||||
if request.method == 'POST':
|
||||
username = request.form['username']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue