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