Foreign app filters

Word filter.

category_by_current_user(request: HttpRequest) QuerySet

Return only user categories.

source_by_current_user(request: HttpRequest) QuerySet

Return only users sources.

class WordsFilter(data=None, queryset=None, *, request=None, prefix=None)

Bases: FilterSet

Word filter.

static filter_word_by_any_translation(queryset: QuerySet, name: object, value: object) QuerySet

Find a word in foreign or native.

static get_user_favorite_words(queryset: QuerySet, name: object, value: object) QuerySet

Filter words by ‘favorites’ field.

static get_filtered_study_stage(queryset: QuerySet, name: object, value: object) QuerySet

Filter words by study stage (progress).

static get_filter_fields() tuple[str, ...]

Get filter fields.