0
点赞
收藏
分享

微信扫一扫

django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app witho

django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.

 

解决方案:

(1)在 setting.py 中设置
    DEBUG = False
    ALLOWED_HOSTS = ['*']

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

(2)执行命令
    python manage.py collectstatic



举报

相关推荐

0 条评论