什么"这里不允许使用目录索引".意味着Django错误?

dan*_*007 8 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.
Run Code Online (Sandbox Code Playgroud)

什么"这里不允许使用目录索引".意思?什么是目录索引?

我用Google搜索,我发现所有结果都与提供静态文件有关.但是,我不认为我这样做.这个错误是什么意思?

Dan*_*rst 9

检查settings.py文件中的STATIC_URL值.您希望该值是存储静态文件的子文件夹 - 通常STATIC_URL = '/static/'.