什么“这里不允许使用目录索引.”是指Django错误?

我正在尝试调试我的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 /’.

dawei

【声明】:唐山站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。