Unable to perform collectstatic

前端 未结 7 1255
爱一瞬间的悲伤
爱一瞬间的悲伤 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:26

    well had this error as well. I fixed:

    STATIC_URL = '/static/'
    if DEBUG:
       STATICFILES_DIRS = [
       os.path.join(BASE_DIR, 'static'),
       ]
    else:
       STATIC_ROOT = os.path.join(BASE_DIR,'static')
    
    MEDIA_URL = '/media/'
    MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
    

提交回复
热议问题