0

我没有在 Django 中显示任何静态文件。

回购位于git clone git@bitbucket.org:codyc54321/bookwormbud.git

在 settings.py 我有

STATIC_ROOT = os.path.join(BASE_DIR, 'static')

STATIC_URL = '/static/'

我在根目录中有一个静态文件夹

我无法访问任何静态文件。现在有问题的文件是http://127.0.0.1:8000/static/images/bookshelf_background.jpg

加载失败在static/main.css

html {
    background-image:url('/static/images/bookshelf_background.jpg');
    background-repeat:no-repeat;
    background-size:100%;
    background-attachment: fixed;
}

使用 Django 1.10。谢谢

4

0 回答 0