当我尝试在 django 中运行 makemigrations 命令时,它给了我一个错误:
TypeError: _getfullpathname: path should be string, bytes or os.PathLike, not list
帮我解决这个问题。
这是我的静态根目录和媒体根目录:
# settings.py
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
STATIC_ROOT = [os.path.join(BASE_DIR, 'static_root')]
MEDIA_ROOT = [os.path.join(BASE_DIR, 'media_root')]