Python I';当使用dropbox作为django存储时,我收到一个ApiError
我使用dropbox作为django存储来提供媒体文件,当上传到dropbox时,所有文件都正常工作,正如预期的那样上传到根目录,但上传的图像不会在模板上呈现 显示的错误Python I';当使用dropbox作为django存储时,我收到一个ApiError,python,django,django-templates,dropbox,dropbox-api,Python,Django,Django Templates,Dropbox,Dropbox Api,我使用dropbox作为django存储来提供媒体文件,当上传到dropbox时,所有文件都正常工作,正如预期的那样上传到根目录,但上传的图像不会在模板上呈现 显示的错误 ApiError at /index ApiError('304328f4c8384ce99352fc8e9c338f71', GetTemporaryLinkError('path', LookupError('not_found', None))) Request Method: GET Request URL: h
ApiError at /index
ApiError('304328f4c8384ce99352fc8e9c338f71', GetTemporaryLinkError('path', LookupError('not_found', None)))
Request Method: GET
Request URL: http://127.0.0.1:8000/index
Django Version: 3.1.2
Exception Type: ApiError
Exception Value:
ApiError('304328f4c8384ce99352fc8e9c338f71', GetTemporaryLinkError('path', LookupError('not_found', None)))
Exception Location: /home/raam124/.local/share/virtualenvs/rattota-GtEiaCOf/lib/python3.8/site-packages/dropbox/dropbox.py, line 337, in request
Python Executable: /home/raam124/.local/share/virtualenvs/rattota-GtEiaCOf/bin/python
Python Version: 3.8.5
Python Path:
['/home/raam124/Documents/rattota',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/home/raam124/.local/share/virtualenvs/rattota-GtEiaCOf/lib/python3.8/site-packages']
Server time: Fri, 23 Oct 2020 10:02:16 +0000
我的静态和媒体文件设置
os.path.join(BASE_DIR, "static"),
os.path.join(BASE_DIR, "media"),
]
STATIC_URL = '/static/'
MEDIA_URL = '/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static_cdn')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media_cdn')
我的dropbox存储设置
DEFAULT_FILE_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
DROPBOX_OAUTH2_TOKEN = 'token here'
DROPBOX_ROOT_PATH = '/'
我正在使用
<img alt="" class="card-img img-fluid geeks" src="{{topstory.image.url}}" />