Django solr_缩略图裁剪图像未加载
我想使用solr_缩略图生成缩略图,但出现错误。 我已经按照教程生成了缩略图并保存在缓存文件夹下。但现在它正在查看Django solr_缩略图裁剪图像未加载,django,sorl-thumbnail,Django,Sorl Thumbnail,我想使用solr_缩略图生成缩略图,但出现错误。 我已经按照教程生成了缩略图并保存在缓存文件夹下。但现在它正在查看/home/vaibhav/TRAC/flipdiscounters/flipdiscounts/flipdiscountApp/images/cache/b2/f7/b2f7287e13292d73659a0fde830ef197.jpg/ URL.py: url(r'^images/(?P<path>.*)/$', 'django.views.static.serve
/home/vaibhav/TRAC/flipdiscounters/flipdiscounts/flipdiscountApp/images/cache/b2/f7/b2f7287e13292d73659a0fde830ef197.jpg/
URL.py:
url(r'^images/(?P<path>.*)/$', 'django.views.static.serve', # For store image
{'document_root': MEDIA_ROOT, 'show_indexes': False}),
url(r'^images/(?P.*)/$,'django.views.static.service',#用于存储图像
{'document_root':MEDIA_root,'show_index':False}),
有人能帮我吗…尝试将您的媒体根目录设置为
/home/vaibhav/TRAC/flipdiscounters/flipdiscounters/flipdiscountApp/images/
并将您的媒体URL设置为/images/
并在你的url.py中使用它
from django.conf.urls.static import static
from django.conf import settings
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)