Django — Can't get static CSS files to load

后端 未结 20 1853
借酒劲吻你
借酒劲吻你 2020-11-29 23:45

I\'m running Django\'s development server (runserver) on my local machine (Mac OS X) and cannot get the CSS files to load.

Here are the relevant entries

20条回答
  •  再見小時候
    2020-11-30 00:27

    add following in settings.py

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

提交回复
热议问题