0
これは私の現在のビューです。Django-Haystack:FacetedSearchViewで余分なコンテキストを渡す方法
class FacetedSearchView(BaseFacetedSearchView):
form_class = FacetedProductSearchForm
facet_fields = ['TopCategory']
template_name = 'shop-grid-ls.html'
paginate_by = 20
context_object_name = 'object_list'
extra = TopCategory.objects.all()
def extra_context(self):
return {
'extra': self.extra,
}
私は私のテンプレートでextra
オブジェクトにアクセスすることはできません。 FacetedSearchViewでコンテキストを渡すにはどうすればよいですか。おかげさまで