Implement more information displays

This commit is contained in:
2026-02-15 19:27:16 +00:00
parent 4cf75b9923
commit 1ebd565f44
13 changed files with 1421 additions and 271 deletions

View File

@@ -657,14 +657,21 @@ class OSINTSearch(LoginRequiredMixin, View):
) -> list[dict[str, str]]:
options = []
for field in model_cls._meta.get_fields():
if field.auto_created and not field.concrete and not field.many_to_many:
# Skip reverse/accessor relations (e.g. ManyToManyRel) that are not
# directly searchable as user-facing fields in this selector.
if field.auto_created and not field.concrete:
continue
if field.name == "user":
continue
label = getattr(
field,
"verbose_name",
str(field.name).replace("_", " "),
)
options.append(
{
"value": field.name,
"label": field.verbose_name.title(),
"label": str(label).title(),
}
)
options.sort(key=lambda item: item["label"])