📜  Django 中的静态资源 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:04.589000             🧑  作者: Mango

代码示例1
STATIC_URL = '/static/'
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'static'),
]
STATIC_ROOT = os.path.join(BASE_DIR, 'static_root')
 
 
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')