Django Reverse for 'artic_post' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Reverse for 'home' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
此问题出现的原因是我的文件中出现了{{% url 'home' %}}这样的语句,url配置错误了,因为我并没有在相应的url配置语句里面指定name值。
解决方法只需要在相应的url配置后面加上name='home'就可以了
注:这种错误一般都是模板里面{% url '' %} 与urls.py中的name=''不匹配,一般都是写错了或者匹配错误。
比如这个artic_post实际name='article_post',就是写错了。
Django Reverse for 'artic_post' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []的更多相关文章
- NoReverseMatch at /salesman/zhuce/ Reverse for '/zhuce/' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
NoReverseMatch at /salesman/zhuce/ Reverse for '/zhuce/' with arguments '()' and keyword arguments ' ...
- django 报错Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: ['$post/(?P<pk>[0-9]+)/$']
Django报错:Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: [' ...
- 关于arguments.callee.caller.arguments[0]获得event的一些问题
先从一个简单的例子说起,一个简单的button控件如下: < input type ='button' name ='mybtn' id ='mybtn' onclick ='myFun ...
- Error Code: 1318. Incorrect number of arguments for PROCEDURE student.new_procedure; expected 0, got
1.错误描述 13:58:20 call new_procedure('2000','zhangsan') Error Code: 1318. Incorrect number of argument ...
- Python3 & Decorators with arguments & @Decorators with arguments bug
Python3 & Decorators with arguments & @Decorators with arguments bug @Decorators with argume ...
- Django reverse函数
1.总urls.py内容如下: from django.contrib import admin from django.urls import path from django.conf.urls ...
- Eclipse中Program arguments和VM arguments的说明
在运行程序的时候,我们一般可以进行run configuration的配置,就比如tomcat源码导入eclipse之后,我们可以发现其运行配置如下: 其中Program arguments配置的元素 ...
- Run Configurations(Debug Configurations)->Arguments里填写program arguments和VM arguments
如图: 1.program arguments存储在String[] args里 2.VM arguments设置的是虚拟机的属性,是传给java虚拟机的.KV形式存储的,是可以通过System.ge ...
- Eclipse 中 program arguments 与 VM arguments 的区别
1. program arguments 中的值作为 主函数中的参数args[] 传入 2. VM Arguments 是设置的java虚拟机的属性,这些系统属性都以-D开头, VM argument ...
随机推荐
- java——虚拟机、线程
java虚拟机: 是一台想象中的机器,有自己想象的硬件(处理器.堆栈.寄存器等)以及相应的指令系统. 生命周期:当执行java程序时,虚拟机开始运行,程序结束虚拟机停止.同一台计算机每多运行一个程序, ...
- 解决ajax提交中文数据乱码
function replaceWord(date,wordurl){ $.ajax({ url : 'wordReplace', ...
- Not so Mobile UVA - 839
题目链接:https://vjudge.net/problem/UVA-839 题目大意:输入一个树状天平,根据力矩相等原则,判断是否平衡. 如上图所示,所谓力矩相等,就是Wl*Dl=Wr*Dr. ...
- nginx 访问路径配置
比如: http://127.0.0.1/ 对应的物理路径 c:/a/b/c 比如:http://127.0.0.1/eec 访问的地址对应的物理路径: d:/a/b/c #user nobody; ...
- 详细记录vue项目实战步骤(含vue-cli脚手架)
一.通过vue-cli创建了一个demo. (vue-cli是快速构建这个单页应用的脚手架,本身继承了多种项目模板:webpack(含eslit,unit)和webpack-simple(无eslin ...
- webgl学习总结画线面及场景和物体动
WebGL是在浏览器中实现三维效果的一套规范.是浏览器中的3D引擎,是利用js代码来实现加载3D模型,渲染.输出等功能,从而实现在浏览器和微信中浏览三维文件的效果. three.js是基于WebGL的 ...
- java解析json串常识
注意:JSONObject 和JSONArray的使用区别 报错:A JSONObject text must begin with '{' at character 1 of 分析: JSONOb ...
- OnDeserializedAttribute 不能作用于 Xml Serialization 上
在做测试的时候习惯用xml serialization观察结果.想当然的认为OnDeserialized Attribute 可以同样的使用,但是其实Xml Serialization 并没有实现相对 ...
- linq 两个字段排序
在linq中排序方法有: OrderBy() --对某列升序排序 ThenBy() --某列升序后对另一列后续升序排序 OrderByDescending() --对某列降序排序 ThenBy ...
- nopCommerce 4.10 发布了
我们的开发工作主要集中在将nopCommerce转移到.NET Core 2.1,性能和架构改进,进一步增强和修复错误. NopChommerce 中文社区:http://www.nopcn.com ...