mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-24 22:53:43 +03:00
updated files
This commit is contained in:
parent
07640962fa
commit
8f19d51410
|
@ -13,6 +13,11 @@
|
||||||
from ..documents import FileDocument
|
from ..documents import FileDocument
|
||||||
from .lema import lemmatize_and_remove_stopwords
|
from .lema import lemmatize_and_remove_stopwords
|
||||||
|
|
||||||
|
"""
|
||||||
|
Calculus on types of searches:
|
||||||
|
https://new.akarpov.ru/files/FZUTFBIyfbdlDHVzxUNU
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class BaseSearch:
|
class BaseSearch:
|
||||||
def __init__(self, queryset: QuerySet | None = None):
|
def __init__(self, queryset: QuerySet | None = None):
|
||||||
|
|
|
@ -92,9 +92,7 @@ def get_queryset(self):
|
||||||
):
|
):
|
||||||
return self.filter(BaseFileItem.objects.none())
|
return self.filter(BaseFileItem.objects.none())
|
||||||
return self.filter(
|
return self.filter(
|
||||||
BaseFileItem.objects.cache().filter(
|
BaseFileItem.objects.filter(user=self.request.user, parent__isnull=True)
|
||||||
user=self.request.user, parent__isnull=True
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user