Django 访问admin提示ViewDoesNotExist at /admin/
ViewDoesNotExist at /admin/
Could not import django.views.generic.simple.redirect_to. Parent module django.views.generic.simple does not exist. Request Method: GET Request URL: http://127.0.0.1:8888/admin/
Django Version:1.7.8 Exception Type:ViewDoesNotExist Exception Value: Could not import django.views.generic.simple.redirect_to. Parent module django.views.generic.simple does not exist. Exception Location: C:\Python27\lib\site-packages\django-1.7.8-py2.7.egg\django\core\urlresolvers.py in get_callable, line 104 Python Executable: C:\Python27\python.exe Python Version:2.7.9 Python Path: ['D:\\samcao\\mailclient',
'C:\\Python27\\lib\\site-packages\\django-1.7.8-py2.7.egg',
'C:\\Windows\\system32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages'] Server time: Sat, 13 Jun 2015 17:06:45 +0800
最终检查发现是由于urls.py中的url设置有问题:
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'mailclient.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^favicon\.ico$','django.views.generic.simple.redirect_to',{'url':'/static/images/favicon.ico'}),
)
上面因为之前配置ICO文件时有配置
django.views.generic.simple.redirect_to
测试有误.将其删除掉.恢复正常.
最终截图
Django 访问admin提示ViewDoesNotExist at /admin/的更多相关文章
- django基础知识之后台管理Admin站点:
Admin站点 通过使用startproject创建的项目模版中,默认Admin被启用 1.创建管理员的用户名和密码 python manage.py createsuperuser 然后按提示填写用 ...
- 使用django执行数据更新命令时报错:django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency users.00 01_initial on database 'default'.
如果在重新封装更新用户表之前,已经更新了数据表,在数据库中已经有了django相关的依赖表,就会报错: django.db.migrations.exceptions.InconsistentMigr ...
- Django拾遗--pagination、sitemap、admin、form
Django拾遗--pagination.sitemap.admin.form pagination 其实这个分页模块的原理就是根据设定的每页条数来分割queryset.查询结果/每页子项数目=页数 ...
- django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applie
Traceback (most recent call last): File "manage.py", line 15, in <module> execute_fr ...
- 替换django的user模型出现的异常django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency users.0001_initial on database 'default'
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applie ...
- 安装wamp,访问主页提示PHP configuration loaded file……
安装wamp,访问主页提示PHP configuration loaded file…… *** ERROR *** The PHP configuration loaded file is: - s ...
- 访问google提示"您的连接不是私密连接"
直接访问google 提示这个,连subject 也变成连baidu 您的连接不是私密连接 攻击者可能会试图从 www.google.com 窃取您的信息(例如:密码.通讯内容或信用卡信息).了解详情 ...
- SQLServer访问WebServices提示:SQL Server 阻止了对组件 'Ole Automation Procedures' 的 过程'sys.sp_OACreate' 的访问
问题描述 在数据库中调用webservices, 提示:SQLServer访问WebServices提示:SQL Server 阻止了对组件 'Ole Automation Procedures' 的 ...
- 关于django访问默认后台admin的时候提示403错误,
Forbidden (403) CSRF verification failed. Request aborted. You are seeing this message because this ...
随机推荐
- SQLServer 学习笔记 序
邀月的博客 http://www.cnblogs.com/downmoon/archive/2011/03/10/1980172.html
- 【OpenGL】三角形
步骤 初始化顶点数组对象VAO 分配顶点缓冲对象VBO 将顶点数据载入缓冲对象中 glBufferData() 链接顶点属性 glVertexAttribPointer(指定了顶点着色器的变量与我们存 ...
- Nginx 功能
本文只针对Nginx在不加载第三方模块的情况能处理哪些事情,由于第三方模块太多所以也介绍不完,当然本文本身也可能介绍的不完整,毕竟只是我个人使用过和了解到过得,欢迎留言交流. Nginx能做什么 ...
- HDU_1024.MaxSumPlusPlus(基础DP + 滚动数组优化讲解)
这道题打破了我常规的做题思路,因为这是我刚开始训练DP,感觉这道题目好晕眼呀,emm其实就是感觉自己是真的菜...... 为什么说打破了我的做题思路呢,因为我平时看题解都是在已经AC或者完全不懂的情况 ...
- POJ-3126.PrimePath(欧拉筛素数打表 + BFS)
给出一篇有关素数线性筛和区间筛的博客,有兴趣的读者可以自取. 本题大意: 给定两个四位的素数,没有前导零,每次变换其中的一位,最终使得两个素数相等,输出最小变换次数.要求变换过程中的数也都是素数. 本 ...
- 转移动APP测试实践
http://blog.csdn.net/hgstclyh/article/details/53115325
- redis 简介,安装与部署
NOSQL简介 NoSQL,泛指非关系型的数据库,NoSQL数据库的四大分类: 键值(Key-Value)存储数据库:这一类数据库主要会使用到一个哈希表,这个表中有一个特定的键和一个指针指向特定的数据 ...
- 微信小程序template模板与component组件的区别和使用
前言: 除了component,微信小程序中还有另一种组件化你的方式template模板,这两者之间的区别是,template主要是展示,方法则需要在调用的页面中定义.而component组件则有自己 ...
- 专项测试——移动app安装包检测
一.背景和现状 安装包的重要性无需多提,针对安装包质量控制越来越严格和规范,包括证书.文件大小.安装成功率等,APP的证书及混淆是影响APP的安装成功率及代码安全性的很大因素,随着功能迭代,安装包也会 ...
- C#获取上传文件的扩展名
然后在代码页中写//上传图片if (UpFile.PostedFile != null){ HttpPostedFile mFile= UpFile.PostedFile; int fileS ...