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 ...
随机推荐
- oracle RMAN使用
一步一步学RMAN 备份 RMAN连接上ORACLE,WINDOWS下在命令模式下 RMAN TARGET / 连接本地数据库用的是本地认证模式.RMAN连接数据库必须在dedicate模式下.因此在 ...
- centos下send-mail出错
当在脚本中执行发邮件操作得时候出现以下错误:send-mail: fatal: parameter inet_interfaces: no local interface found for ::1 ...
- target=_blank攻击
[target=_blank攻击] 在<a>标签中加入 rel="noopener noreferrer" 来避免. 参考:https://mathiasbynens. ...
- 预览InputFile
[预览InputFile] 通过input的files属性,可以取到选择的File对象,通过FileReader可以将File对象读取出来. <body> <input type=& ...
- yum update 自动忽略内核更新
系统每天凌晨 3 点自动执行 yum update 任务 但升级内核后,会出现下面情况 一些编译软件需要内核模块才能够被调用, 而内核模块需要与当前版本内核编译后才能够使用, 假设内核升级后,之前软件 ...
- db2 性能查看top sql
DB2 V10.3 查看top sql ,类似oracle 这篇文章是对之前有篇db2 v9的简化更新,总体还是觉得DB2TOP比较好用直观,不过需要导出SQL时,或自动化脚本时,还是建议执行S ...
- 机器人编程挑战python
机器人编程挑战 要使用pip安装模拟器,请运行pip install zombiedice(在Windows上)或pip3 install zombiedice(在macOS和Linux上).要使用一 ...
- rancher 2 webhook 格式
{ "version":"4", "groupKey":<string>, "status":"& ...
- as2.0 清除主时间轴上所有的影片简介
for (var i in _root) { if (typeof _root[i] == "movieclip") { _root[i].swapDepths(1); _root ...
- 第九章 词典 (c)散列:散列函数