logging: don't group by logging_group

This commit is contained in:
Jonas Winkler
2020-11-02 01:24:56 +01:00
parent ffdb517b73
commit c497ff4a5d
6 changed files with 54 additions and 104 deletions

View File

@@ -1,11 +1,10 @@
from django_filters.rest_framework import BooleanFilter, FilterSet
from .models import Correspondent, Document, Tag, DocumentType
from .models import Correspondent, Document, Tag, DocumentType, Log
CHAR_KWARGS = ["istartswith", "iendswith", "icontains", "iexact"]
ID_KWARGS = ["in", "exact"]
INT_KWARGS = ["exact"]
INT_KWARGS = ["exact", "gt", "gte", "lt", "lte"]
DATE_KWARGS = ["year", "month", "day", "date__gt", "gt", "date__lt", "lt"]
@@ -68,3 +67,16 @@ class DocumentFilterSet(FilterSet):
"document_type__name": CHAR_KWARGS,
}
class LogFilterSet(FilterSet):
class Meta:
model = Log
fields = {
"level": INT_KWARGS,
"created": DATE_KWARGS,
"group": ID_KWARGS
}