perf: 支持全局的 labels (#12043)

* perf: 支持全局的 labels

* perf: stash

* stash

* stash

* stash

* stash

* perf: 优化 labels

* stash

* perf: add debug sql

* perf: 修改 labels

* perf: 优化提交

* perf: 优化提交 labels

* perf: 基本完成

* perf: 完成 labels 搜索

* perf: 优化 labels

* perf: 去掉不用 debug

---------

Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
fit2bot
2023-12-05 11:16:34 +08:00
committed by GitHub
parent a91cb1afd5
commit 8291a81efd
71 changed files with 1618 additions and 978 deletions

View File

@@ -11,7 +11,7 @@ from rest_framework.settings import api_settings
from common.drf.filters import (
IDSpmFilterBackend, CustomFilterBackend, IDInFilterBackend,
IDNotFilterBackend, NotOrRelFilterBackend
IDNotFilterBackend, NotOrRelFilterBackend, LabelFilterBackend
)
from common.utils import get_logger, lazyproperty
from .action import RenderToJsonMixin
@@ -111,7 +111,7 @@ class ExtraFilterFieldsMixin:
"""
default_added_filters = (
CustomFilterBackend, IDSpmFilterBackend, IDInFilterBackend,
IDNotFilterBackend,
IDNotFilterBackend, LabelFilterBackend
)
filter_backends = api_settings.DEFAULT_FILTER_BACKENDS
extra_filter_fields = []