Closed scku208 closed 2 years ago
Are you following the book? The next
argument is not part of the form, it is a feature of Flask-Login that makes the log in experience better for users.
Are you following the book? The
next
argument is not part of the form, it is a feature of Flask-Login that makes the log in experience better for users.
Thanks for the reply, and I am not following the book yet but study in your microblog tutorial. It's my mistake to add action="{{ request.path }}"
in the submit form template.
Now everything goes well and thank you for being patient with me.
Hi, thanks for writing this great repository.
May I ask the concept about login_required and redirect? in flasky/app/auth/views.py start from line 30:
Does the line
next = request.args.get('next')
always returnNone
because it's withinform.validate_on_submit()
which should always submit the form by method POST?Maybe It can use
request.form.get('next')
with writing some hidden input namednext
in template/auth/login.html in {{ wtf.quick_form(form) }} to get the value of redirectnext
.Thanks.