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
最終檢查發(fā)現(xiàn)是由于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
測試有誤.將其刪除掉.恢復正常.
最終截圖
