我想提供robots.txt
,humans.txt
和manifest.json
之类的文件。
我看到了文档,但没有找到解决方案,发现view.render
仅提供HTML而不提供文本,JSON或任何其他文件。
答案 0 :(得分:0)
在config/storage.py
中添加文件夹路径和别名
# config/storage.py
STATICFILES = {
'storage/static': 'static/',
'storage/compiled': 'static/',
'storage/uploads': 'static/',
'storage/root': '/' # add this line
}
在root
内创建storage
文件夹,并将robots.txt
放在root
文件夹中。