看看权限配置好了没有
settings.py 配置
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'vue/dist/static')
UPLOAD_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [
("css", os.path.join(STATIC_ROOT, 'css')),
("img", os.path.join(STATIC_ROOT, 'img')),
("js", os.path.join(STATIC_ROOT, 'js')),
("upload", os.path.join(UPLOAD_ROOT, 'upload')),
("fonts", os.path.join(STATIC_ROOT, 'fonts')),
]
url 配置
re_path(r'^static/(?P<path>.*)$',serve,{'document_root': settings.UPLOAD_ROOT}),