什么“这里不允许使用目录索引.”是指Django错误?
发布时间:2020-12-16 23:42:32 所属栏目:Python 来源:网络整理
导读:我正在尝试调试我的Django应用程序中出现的这个奇怪的404错误. Page not found (404)Request Method: GETRequest URL: http://78.198.124.245/Directory indexes are not allowed here.You're seeing this error because you have DEBUG = True in your Djan
我正在尝试调试我的Django应用程序中出现的这个奇怪的404错误.
Page not found (404) Request Method: GET Request URL: http://78.198.124.245/ Directory indexes are not allowed here. You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False,and Django will display a standard 404 page. 什么“这里不允许使用目录索引”.意思?什么是目录索引? 我用Google搜索,我发现所有结果都与提供静态文件有关.但是,我不认为我这样做.这个错误是什么意思? 解决方法
检查settings.py文件中的STATIC_URL值.您希望该值是存储静态文件的子文件夹 – 通常为STATIC_URL =’/ static /’.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |