raise FormDataRoutingRedirect(request)
FormDataRoutingRedirect: A request was sent to this URL (http://127.0.0.1:5000/resource/vender) but a redirect was issued automatically by the routing system to "http://127.0.0.1:5000/resource/vender/".  The URL was defined with a trailing slash so Flask will automatically redirect to the URL with the trailing slash if it was accessed without one.  Make sure to directly send your POST-request to this URL since we can't make browsers or HTTP clients redirect with form data reliably or without user interaction.

又写了一个BUG,路由配的不仔细

按照这个写法,我们匹配的路由应该为"http://127.0.0.1:5000/resource/vender/".

但是接口里

我们却访问的这个,导致发生错误,所以以后斜杠一定要注意

也可以在写路由时,加上一个参数strict_slashes=False,这个匹配时,就会对末尾的/不严格区分,有无均能匹配成功

Flask路由报错:raise FormDataRoutingRedirect(request)的更多相关文章

  1. 网页中嵌入百度地图报错:The request has been blocked,the content must served over Https

    网页中嵌入百度地图 1.进入百度地图开发平台:http://lbsyun.baidu.com/index.php?title=jspopular 2.获取密钥:http://lbsyun.baidu. ...

  2. svn报错 400 Bad Request

    MyEclipse中的svn,commit经常报错 Error: Commit failed (details follow):  Error: At least one property chang ...

  3. [Linux]Centos git报错fatal: HTTP request failed

    在使用git pull.git push.git clone会报类似例如以下的错误: error: The requested URL returned error: 401 Unauthorized ...

  4. 报错 Filtered offsite request

    用scrapy框架迭代爬取时报错 scrapy日志: 在 setting.py 文件中 设置 日志 记录等级 LOG_LEVEL= 'DEBUG' LOG_FILE ='log.txt' 观察 scr ...

  5. SpringBoot整合升级Spring Security 报错 【The request was rejected because the URL was not normalized】

    前言 最近LZ给项目框架升级, 从Spring1.x升级到Spring2.x, 在这里就不多赘述两个版本之间的区别以及升级的原因. 关于升级过程中踩的坑,在其他博文中会做比较详细的记录,以便给读者参考 ...

  6. 【linux】【git】git报错fatal: HTTP request failed

    在使用git pull.git push.git clone会报类似如下的错误: error: The requested URL returned error: 401 Unauthorized w ...

  7. centos git clone 报错 fatal: HTTP request failed 解决办法

    git clone报错提示 git clone https://github.com/xxxx.git Initialized empty Git repository in /root/xxxx/. ...

  8. Django:报错 raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)

    Django 执行迁移生成表: python manage.py migrate 报错: raise MigrationSchemaMissing("Unable to create the ...

  9. 报错: raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)

    Django2.0同步Mysql数据库时出现的问题 执行 python manage.py makemigrations 报错 # 报错位置 File "G:\python\lib\site ...

随机推荐

  1. 使用Linux的Crontab定时执行PHP脚本

    0 */6 * * * /home/kdb/php/bin/php /home/kdb/apache/htdocs/lklkdbplatform/kdb_release/Crontab/index.p ...

  2. 被低估的.net(中) - 广州.net俱乐部2019年纲领

    这是被低估的.net系列的中篇.上篇在这里:被低估的.net(上) - 微软MonkeyFest 2018广州分享会活动回顾 中篇本来不是这样的,中篇的草稿大纲其实在写上篇之前就写好了,嗯,当时给张队 ...

  3. 使用 Python

    使用 Python Python 官网及镜像 官网:https://www.python.org/ 镜像:http://npm.taobao.org/mirrors/python/ 安装玩Python ...

  4. Android权限之动态权限

    安卓系统的权限管理机制从API 23 (也就是Android 6.0 又叫做 Android M,)之后发生了比较大的改变,在一些比较危险的权限上要求必须申请动态权限,即使你在AndroidMainf ...

  5. DAY3(PYTHON)字符串切片

    字符串调整: capitalize()   #首字母大写 upper()        #全大写 lower()      #全小写 swapcase() #大小写翻转 字符串切片: 顾头不顾尾!!! ...

  6. c# .Net随机生成字符串代码

    /// <summary> /// 随机生成字符串 /// </summary> /// <param name="OperationType"> ...

  7. SQL SERVER查询字段在哪个表里

    ); SET @ColumnName='字段名的模糊匹配'; SELECT 表名=D.NAME, 表说明 THEN ISNULL(F.VALUE, ' ') ELSE ' ' END, 字段序号 = ...

  8. MySQL服务使用

    MySQL服务使用 1. 启动服务 启动服务: service mysql start 或者 sudo /etc/init.d/mysql start 2. 关闭服务 关闭服务: service my ...

  9. f.lux 自动调节显示器色温

    我的环境 f.lux 我的使用感受是让屏幕看起来舒服一些,因为我有近视,所以需要保护眼睛. f.lux官网:https://justgetflux.com/ f.lux v4.47 windows 1 ...

  10. python列表与元组的用法

    python列表与元组的用法 目录: 列表的用法: 1.增   append   +    extend 2.删  del    remove 3.改   insert 4.查  index 5.反向 ...