什么“这里不允许使用目录索引.”是指Django错误?
发布时间:2020-09-21 20:22:35 所属栏目:Python 来源:互联网
导读:我正在尝试调试我的Django应用程序中出现的这个奇怪的404错误. Page not found (404)Request Method: GETRequest URL: http://78.198.124.245/Directory indexes are not allowed here.Youre seeing this error because you have DEB
我正在尝试调试我的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 /’.(编辑:莱芜站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- `with canvas:`(Python`with something()as x:`)如何隐式
- python2 str object has no attribute decode
- .net – 使用异步,等待与System.Threading.Thread.Sleep
- 什么python代码为二元运算符生成所有可能的分组(树)
- django,壁球迁移,太多循环依赖
- 在IPython中使用Interactive Shell之外的魔术命令
- python – PIL open()方法不能使用BytesIO
- python – 当涉及离散变量时,pymc3与pymc2的困难
- python – 使用Flask-WTForms字段描述呈现html标题属性
- python – Opencv Homography矩阵H和Inverse H转换点没有得