Nginx+django全文检索无法访问索引模板txt文件,请教我应该如何修改站点设置才能正常访问索引模板txt文件- File "/www/wwwroot/wlxy.lmaths.com/6b471054ea1f7fcaf687330e6039d84e_venv/lib/python3.9/site-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
- (receiver, receiver(signal=self, sender=sender, **named))
- File "/www/wwwroot/wlxy.lmaths.com/6b471054ea1f7fcaf687330e6039d84e_venv/lib/python3.9/site-packages/haystack/signals.py", line 49, in handle_save
- index.update_object(instance, using=using)
- File "/www/wwwroot/wlxy.lmaths.com/6b471054ea1f7fcaf687330e6039d84e_venv/lib/python3.9/site-packages/haystack/indexes.py", line 324, in update_object
- backend.update(self, [instance])
- File "/www/wwwroot/wlxy.lmaths.com/./future_home/whoosh_cn_backend.py", line 195, in update
- doc = _index.full_prepare(obj)
- File "/www/wwwroot/wlxy.lmaths.com/6b471054ea1f7fcaf687330e6039d84e_venv/lib/python3.9/site-packages/haystack/indexes.py", line 235, in full_prepare
- self.prepared_data = self.prepare(obj)
- File "/www/wwwroot/wlxy.lmaths.com/6b471054ea1f7fcaf687330e6039d84e_venv/lib/python3.9/site-packages/haystack/indexes.py", line 226, in prepare
- self.prepared_data[field.index_fieldname] = field.prepare(obj)
- File "/www/wwwroot/wlxy.lmaths.com/6b471054ea1f7fcaf687330e6039d84e_venv/lib/python3.9/site-packages/haystack/fields.py", line 236, in prepare
- return self.convert(super().prepare(obj))
- File "/www/wwwroot/wlxy.lmaths.com/6b471054ea1f7fcaf687330e6039d84e_venv/lib/python3.9/site-packages/haystack/fields.py", line 100, in prepare
- return self.prepare_template(obj)
- File "/www/wwwroot/wlxy.lmaths.com/6b471054ea1f7fcaf687330e6039d84e_venv/lib/python3.9/site-packages/haystack/fields.py", line 213, in prepare_template
- t = loader.select_template(template_names)
- File "/www/wwwroot/wlxy.lmaths.com/6b471054ea1f7fcaf687330e6039d84e_venv/lib/python3.9/site-packages/django/template/loader.py", line 47, in select_template
- raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
- django.template.exceptions.TemplateDoesNotExist: search/indexes/information/article_text.txt
复制代码 search/indexes/information/article_text.txt文件是存在templates目录里面的
|
|