当我尝试指定 favicon 时找不到 Django 静态文件

问题描述 投票:0回答:1
python django image static favicon
1个回答
0
投票

在settings.py中添加

STATICFILES_DIRS

STATIC_URL = 'static/'
#STATIC_ROOT = os.path.join(BASE_DIR, 'static') <----- comment this line
STATICFILES_DIRS = [BASE_DIR / 'static'] <----- add this line
© www.soinside.com 2019 - 2024. All rights reserved.