码迷,mamicode.com
首页 > 其他好文 > 详细

Django 访问admin提示ViewDoesNotExist at /admin/

时间:2015-06-16 10:50:30      阅读:403      评论:0      收藏:0      [点我收藏+]

标签:

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/

标签:

原文地址:http://www.cnblogs.com/drgcaosheng/p/4579922.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!