Filters¶
evileg_core.filters module¶
-
class
evileg_core.filters.
EArticleFilter
(data=None, queryset=None, *, request=None, prefix=None)[source]¶ Bases:
evileg_core.filters.EFilterBase
-
advanced_search
= True¶
-
base_filters
= {'ordering_by_pub_date': <django_filters.filters.OrderingFilter object>, 'ordering_by_title': <django_filters.filters.OrderingFilter object>, 'search': <django_filters.filters.CharFilter object>}¶
-
declared_filters
= {'ordering_by_pub_date': <django_filters.filters.OrderingFilter object>, 'ordering_by_title': <django_filters.filters.OrderingFilter object>, 'search': <django_filters.filters.CharFilter object>}¶
-
-
class
evileg_core.filters.
EDateRangeFilter
(field, request, params, model, model_admin, field_path)[source]¶ Bases:
django.contrib.admin.filters.FieldListFilter
Date range filter for Django administration panel
- Parameters
template – html template for filter rendering
-
choices
(changelist)[source]¶ Return choices ready to be output in the template.
changelist is the ChangeList to be displayed.
-
expected_parameters
()[source]¶ Return the list of parameter names that are expected from the request’s query string and that will be used by this filter.
-
get_form
(request)[source]¶ - Parameters
request – HTTP request with filter parameters
- Returns
EDateRangeForm
-
template
= 'evileg_core/date_range_filter.html'¶
-
class
evileg_core.filters.
EEmptyTranslatedFieldsFilter
(request, params, model, model_admin)[source]¶ Bases:
django.contrib.admin.filters.SimpleListFilter
Filter by empty CharField or TextField
- Parameters
title – Title of filter
parameter_name – Field name
-
lookups
(request, model_admin)[source]¶ Must be overridden to return a list of tuples (value, verbose value)
-
parameter_name
= 'parameter name not set'¶
-
title
= 'Filter title not set'¶
-
class
evileg_core.filters.
EExactEmptyFilter
(request, params, model, model_admin)[source]¶ Bases:
django.contrib.admin.filters.SimpleListFilter
Filter by empty fields, for example for CharField or Url
- Parameters
title – Title of filter
parameter_name – Field name
-
lookups
(request, model_admin)[source]¶ Must be overridden to return a list of tuples (value, verbose value)
-
parameter_name
= 'parameter name not set'¶
-
title
= 'Filter title not set'¶
-
class
evileg_core.filters.
EFilterBase
(data=None, queryset=None, *, request=None, prefix=None)[source]¶ Bases:
django_filters.filterset.FilterSet
-
advanced_search
= False¶
-
base_filters
= {'search': <django_filters.filters.CharFilter object>}¶
-
declared_filters
= {'search': <django_filters.filters.CharFilter object>}¶
-
-
class
evileg_core.filters.
ENotNullFilter
(request, params, model, model_admin)[source]¶ Bases:
django.contrib.admin.filters.SimpleListFilter
Filter by null fields, for example for Foreign Key
- Parameters
title – Title of filter
parameter_name – Field name
-
lookups
(request, model_admin)[source]¶ Must be overridden to return a list of tuples (value, verbose value)
-
parameter_name
= 'parameter name not set'¶
-
title
= 'Filter title not set'¶
-
class
evileg_core.filters.
ESectionFilter
(data=None, queryset=None, *, request=None, prefix=None)[source]¶ Bases:
evileg_core.filters.EFilterBase
-
advanced_search
= True¶
-
base_filters
= {'ordering_by_title': <django_filters.filters.OrderingFilter object>, 'search': <django_filters.filters.CharFilter object>}¶
-
declared_filters
= {'ordering_by_title': <django_filters.filters.OrderingFilter object>, 'search': <django_filters.filters.CharFilter object>}¶
-