“2018年2月”存档文章有28

secret

R554.5B1200I1600

The CSRF token is missing.

Flask在向后台提交数据的时候提示:'The CSRF token is missing.'出现这个提示的原因是:前端没有加{{ form.hidden_tag() }}参考资料:Form validation fails due missing CSRF

flask的消息flash如何显示

最近在学习Flask,自己准备开发网站,中间遇到了很多问题,最后还是慢慢解决了。在Flask中后台消息向前台显示可以这样写:@auth.route('/reset', methods=['GET', 'POST']) def password_reset_request(): title = '忘记密码' if not current_user.is_anonymous: ...

454, b'Command not permitted when TLS active'

最近使用Flask发送163邮件的时候遇到了很多问题,前边根据报错提示,不断查询网络,现在问题已经解决,将问题记录下来,方便后人。在配置发送邮件的时候报如下错误:smtplib.SMTPResponseException: (454, b'Command not permitted when TLS active')出现这个错误的原因是163邮箱不支持TLS,即使配置了MAIL_USE_TSL=f...

553, b'Mail from must equal authorized user'

最近使用Flask发送邮件的时候遇到了很多问题,现在问题已经解决,将问题记录下来,方便后人。在配置发送邮件的时候报如下错误:smtplib.SMTPSenderRefused: (553, b'Mail from must equal authorized user', '=?utf-8?q?Flasky_Admin?= <flasky@example.com>')出现这个错误的原因是:网易服务器...