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 ...
随机推荐
- 查看Python支持的.whl文件版本
AMD64 import pip._internal print(pip._internal.pep425tags.get_supported()) WIN32 import pip print(pi ...
- PCB的版本控制
http://club.szlcsc.com/article/details_1783_1.html 转载自:http://www.amobbs.com/thread-5606014-1-1.html ...
- Kudu1.1.0 、 Kudu1.2.0 Kudu1.3.0的版本信息异同比较
不多说,直接上干货! Kudu1.1.0 新特性 python API升级,具备JAVA C++client一样的功能(从0.3版本直接升级到1.1),主要的点如下: 1.1. 改进了Parial ...
- 控制input输入框中提示信息的显示和隐藏的方法
在运用html+css+javascrpt进行页面制作时,我们往往会遇到一些影响用户体验,而又容易被我们忽视的小细节.比如,input输入框中的提示信息,怎样才能根据对象获得和失去焦点而实现其显示和隐 ...
- CentOS7中添加新硬盘
cp /etc/fstab /etc/fstab.bak echo /dev/vdb1 /mnt/disk1 ext4 defaults 0 0 >> /etc/fstab mkdir ...
- Nginx 在Windows下搭建静态Web服务
简介 nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP ...
- c# 字符串大小写混合转换
我是个.net萌新,在大学是计算机应用专业 学的比较杂 出来准备走net方向 培训了两个月了 今天被出了一道上机题 题本来是挺简单的 输入一个字符 如果是大写则转换为小写 如果是小写则转换为大 ...
- Mysql 求时间 between 昨天 and 上个月的今天 等时间函数
问题: Mysql表中一列create_time,类型datetime(YYYY-MM-DD HH:MM:SS),想获取上个月今天到昨天的数据. select * from 表名 where date ...
- Spring Boot集成Hibernate Validator
废话不多说,直接开始集成环境. 一.环境集成 在项目中hibernate-Validator包在spring-boot-starter-web包里面有,不需要重复引用 .(整个Demo都是用PostM ...
- 设计模式之工厂模式详细读后感TT!(五)
一如既往:原文 工厂方法(factory method)模式的意义是定义一个创建产品对象的工厂接口, 将实际创建工作推迟到子类当中. 核心工厂的创建, 这样核心类成为一个抽象工厂角色, 仅仅复制工厂子 ...