1 Commits

Author SHA1 Message Date
2c58bc955f Fixed bad template referencing in filters.py. 2023-09-03 08:25:12 +03:00

View File

@@ -89,7 +89,7 @@ class CategoryFilter(BaseFilterBackend):
""" """
This filter assigns the view.category object for later use, in particular for filters that depend on this one. This filter assigns the view.category object for later use, in particular for filters that depend on this one.
""" """
template = './filters/categories.html' template = 'starfields_drf_generics/filters/categories.html'
category_field = 'category' category_field = 'category'
def get_category_class(self, view, request): def get_category_class(self, view, request):
@@ -203,7 +203,7 @@ class FacetFilter(BaseFilterBackend):
""" """
This filter requires CategoryFilter to be ran before it. It assigns the view.facets which includes all the facets applicable to the current category. This filter requires CategoryFilter to be ran before it. It assigns the view.facets which includes all the facets applicable to the current category.
""" """
template = './filters/facets.html' template = 'starfields_drf_generics/filters/facets.html'
def get_facet_class(self, view, request): def get_facet_class(self, view, request):
return getattr(view, 'facet_class', None) return getattr(view, 'facet_class', None)
@@ -423,7 +423,7 @@ class TrigramSearchFilter(BaseFilterBackend):
# TODO misunderstood the urlconf stuff of the RUD methods, this is probably unnecessary # TODO misunderstood the urlconf stuff of the RUD methods, this is probably unnecessary
class SlugSearchFilter(BaseFilterBackend): class SlugSearchFilter(BaseFilterBackend):
# The URL query parameter used for the search. # The URL query parameter used for the search.
template = './filters/slug.html' template = 'starfields_drf_generics/filters/slug.html'
slug_title = _('Slug Search') slug_title = _('Slug Search')
slug_description = _("The instance's slug.") slug_description = _("The instance's slug.")
slug_field = 'slug' slug_field = 'slug'