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: ['$post/(?P<pk>[0-9]+)/$']

解决方案:
url(r'^$', include(("blog.urls",'blog')))改为url(r'', include(("blog.urls",'blog')))

改为

django 报错Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: ['$post/(?P<pk>[0-9]+)/$']的更多相关文章
- 记一次Django报错Reverse for 'indextwo' with no arguments not found. 1 pattern(s) tried: ['$index/$']
启动python manage.py runserver 打开127.0.0.1:8000,报错信息如下: Reverse for 'indextwo' with no arguments not f ...
- Django 报错 Reverse for 'content' not found. 'content' is not a valid view function or pattern name.
Django 报错 Reverse for 'content' not found. 'content' is not a valid view function or pattern name. 我 ...
- Django报错:OSError: raw write() returned invalid length 4 (should have been between 0 and 2)
在使用Django时Django报错:Django报错:OSError: raw write() returned invalid length 4 (should have been between ...
- Django报错:提交表单报错---RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and you have APPEND_SLASH set.
Django报错:提交表单报错---RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and ...
- Celery 启动报错 can_read() got an unexpected keyword argument timeout
问题: Celery 启动报错 can_read() got an unexpected keyword argument timeout 方案:更改redis版本和celery版本,我使用下面的ce ...
- MRP进程起不来, 报错:ORA-00600: internal error code, arguments: [2619], [227424], [], [], [], [], [], [], [], [], [], []
问题背景:客户数据库服务架构为一主一备,某日备库操作系统意外重启,重启后Oracle MRP进程起不来,报错:ORA-00600: internal error code, arguments: [2 ...
- 执行命令npm publish报错:403 Forbidden - PUT https://registry.npmjs.org/kunmomotest2 - You cannot publish over the previously published versions: 0.0.1.
前言 执行命令npm publish报错:403 Forbidden - PUT https://registry.npmjs.org/kunmomotest2 - You cannot publis ...
- ubuntu pip 安装django报错解决
系统版本 ubuntu Kylin 16.04 LTS 安装pip3 安装 Django 总是提示time out,无法安装. 逛了好多论坛终于遭到了解决办法,分享保存: sudo pi ...
- 关于Django报错django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configure
报错代码:django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but se ...
随机推荐
- WPF 快捷键
原文:WPF 快捷键 <p><pre name="code" class="csharp"> 前台 <Window.Resourc ...
- 【Java】String的首尾去空和判空
去除字符串首尾空白字符:包括\t,\r,\n及" ": //去除字符串首尾空白字符:包括\t,\r,\n及" ": System.out.println(&qu ...
- Python开发GUI实战:图片转换素描画工具!
奋斗没有终点 好好学习72变,因为将来 没有人能替你阻挡81难 . 生如蝼蚁,当有鸿鹄之志: 命如纸薄,应有不屈之心 . 今天被这句话触动了,所以开篇分享给大家.鸡汤有毒,但有时大家却靠它激励自己 ...
- swoole进程间如何通信
Swoole进程间通信的方式 管道pipe 管道用于进程之间的数据交互,Linux系统本身提供了pipe函数用于创建一个半双工通信管道.半双工的通信方式中数据只能单向流动(一端只读一端只写),只能在具 ...
- activiti5初识
因工作需要,接手新的项目,其中用到了activiti实现的工作流,特意去大致学习下,特此记录下. 1.acticiti5框架说明及表结构介绍 Activiti5工作流引擎框架: 它实际上是一个java ...
- Java菜题
编程语言:Java 2019年全国高校计算机能力挑战赛分设大数据算法赛(所谓的内部试题) 一.选择题(共15题,每题3分,共45分) 1. 在Java中下列说法正确的是( ) A.一个子类可以有多 ...
- vs未能正确加载CSharpPackage包,未能正确加载“Microsoft.VisualStudio.Editor.Implementation.EditorPackage”包
VS2017打开项目时提示未能正确加载CSharpPackage包, 可以使用 devenv命令工具来解决,操作如下 打开vs2017开发人员命令提示符(请使用管理员身份运行),如图 敲入 deve ...
- JQ中的Ajax的封装
1.认识JQ中ajax的封装 jQ 对于ajax的封装有两层实现:$.ajax 为底层封装实现:基于 $.ajax ,分别实现了$.get 与$.post 的高层封装实现: 2.Ajax的底 ...
- H5 移动端 键盘遮挡焦点元素解决方案
前言 最近在做 webapp,遇到了很多移动端兼容的问题,其中一个问题就是:输入框触发 focus 后,键盘弹出,然后遮住了输入框. 然后在Android和IOS上,这个问题的表现形式不一样,而原生键 ...
- 顺F速运国际版,你的密码漏点了
- 加密情况分析 对APP的分析过程,当然首先是安装,使用,抓包啦. 同样地,登录,抓包看看. 使用账号密码登录. - 壳呢? 虽然直接解密了顺F国际版的加密数据,但还是有必要看看它的APK. 经过分 ...