Unable to perform collectstatic

前端 未结 7 1331
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-30 02:42

I am new to django ! When I use the command python manage.py collectstatic I get this error

django.core.exceptions.ImproperlyConfigured: You\'re usi         


        
7条回答
  •  情深已故
    2021-01-30 03:44

    Try this,

    PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
    STATIC_ROOT = os.path.join(PROJECT_DIR, 'static')
    

    Look at https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-STATIC_ROOT

提交回复
热议问题