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. K8S 高级调度方式

    可以使用高级调度分为: 节点选择器: nodeSelector.nodeName 节点亲和性调度: nodeAffinity Pod亲和性调度:PodAffinity Pod反亲和性调度:podAnt ...

  2. javaScript 设计模式之中介者模式示例

    飞机把注册信息放到铁塔里,发送数据到铁塔,报告其它的飞机一些信息. var feiji = function( name ){ this.name = name; } feiji.prototype. ...

  3. 中文代码示例之Electron桌面应用开发初体验

    参考: 打造你的第一个 Electron 应用 首先运行下面在目录下创建package.json: $ npm init 去掉了一些无关项后内容如下: { "name": &quo ...

  4. 如何理解MVC?

    MVC全名是Model View Controller,是模型(model)-视图(view)-控制器(controller)的缩写,一种软件设计典范. 那么MVC框架究竟干了些什么:用一种业务逻辑. ...

  5. 我写的Angular相关的文章

    此文正在更新中... Angular6的变化 Angular7的变化 No value accessor for form control with path的解决方案

  6. Android为TV端助力 handler传递消息机制

    当工作线程给主线程发送消息时,因为主线程是有looper的,所以不需要初始化looper,注意给谁发消息就关联谁的handler,此时用的就是主线程的handler handler会把消息发送到Mes ...

  7. [Android][Framework] 添加系统服务

    新博客地址 http://wossoneri.github.io/2018/09/15/[Android][Framework]create-system-service/ 做系统开发,有时候需要自己 ...

  8. 你不可不知的Java引用类型之——ReferenceQueue源码详解

    定义 ReferenceQueue是引用队列,用于存放待回收的引用对象. 说明 对于软引用.弱引用和虚引用,如果我们希望当一个对象被垃圾回收器回收时能得到通知,进行额外的处理,这时候就需要使用到引用队 ...

  9. JS json字符串转对象、对象转字符串

    JSON是javascript原生格式,在JavaScript中处理json数据不需要任何特殊的API或者工具包. JSON中,有两种结构:对象和数组. 在数据传输流中,json是以文本,即字符串的形 ...

  10. web前端(2)—— 前端技术介绍

    前端技术 前文了解了什么是前端,那么前端技术到底有哪些呢?最核心的就这三个: html/html5 css/css3 javascript 什么是HTML HyperText Markup Langu ...