我正在尝试在 webfaction 上使用 wsgi 安装 saleor。当我尝试访问我的页面时,我收到 500 错误,并且日志显示:
SuspiciousFileOperation at /en/
The joined path (/images/placeholder255x255.png) is located outside of the base path component (/home/<user>/lib/python3.6/versatileimagefield/static)
我的设置是:
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
STATIC_URL = 'https://img.website.com/saleor/'
STATICFILES_DIRS = [
('assets', os.path.join(PROJECT_ROOT, 'saleor', 'static', 'assets')),
('favicons', os.path.join(PROJECT_ROOT, 'saleor', 'static', 'favicons')),
('images', os.path.join(PROJECT_ROOT, 'saleor', 'static', 'images')),
('dashboard', os.path.join(PROJECT_ROOT, 'saleor', 'static', 'dashboard'))]
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder']
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
MEDIA_URL = '/media/'
现在这当然是错误的基本路径组件,但我该如何解决呢?