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. Laravel 系列入门教程(二)【最适合中国人的 Laravel 教程】

    本篇文章中,我将跟大家一起体验 Laravel 框架最重要的部分——路由系统. 如果你读过 2015 版的教程,你会发现那篇文章里大书特书的 Auth 系统构建已经被 Laravel 捎带手给解决了. ...

  2. DevExpress ChartControl ViewType.Line

    源码地址:https://files.cnblogs.com/files/lanyubaicl/ChartControl.Line.7z public partial class Form1 : Fo ...

  3. java map集合 --遍历

    1.Map 遍历: Map<Integer, String> map = new HashMap<Integer, String>(); map.put(1, "a& ...

  4. 洛谷P2860 [USACO06JAN]冗余路径Redundant Paths(tarjan求边双联通分量)

    题目描述 In order to get from one of the F (1 <= F <= 5,000) grazing fields (which are numbered 1. ...

  5. python--线程同步原语

    Threading模块是python3里面的多线程模块,模块内集成了许多的类,其中包括Thread,Condition,Event,Lock,Rlock,Semaphore,Timer等等.下面这篇文 ...

  6. 数组去重(JS)

    数据类型: (栈类型) 原始值:boolen,num,string,null,undefined (堆类型) 引用值:object,array 首先重新定义一个type()函数, <script ...

  7. git 入门教程之版本管理

    版本管理 背景 在上一节中我们已经成功创建版本库并且已经添加test.txt等文件,这一节我们继续讲解如何进行版本控制. 首先我们先查看test.txt 文件有什么内容吧! # 查看文件内容 $ ca ...

  8. vue自动完成搜索功能的数据请求处理

    在现在的互联网世界里,自动完成的搜索功能是一个很常见的功能.比如百度.搜狗.360搜索 ... 功能描述一下大概是这个样子的:有一个搜索框,用户在里面输入要查询的条件,系统会“智能”判断用户输完了,然 ...

  9. mac 苹果多版本jdk自由切换

    场景 手头上的工具有时候依赖低版本jdk,有时候需要高版本jdk, 如何在不同版本jdk之间来回自由的切换? 安装 首选需要去官网下载dmg安装包,地址:https://www.oracle.com/ ...

  10. 智能ERP 交接班统计异常的解决方法

    请注意,有交接班统计数据不准确的需开启离线统计即可解决,交接班统计是按照结账时间来进行统计的 1.点击左侧导航栏中‘更多’-进入系统设置 2.进入营业设置后-开启离线统计-点击保存