feat: make site prefix column sortable

Clicking the Prefix column header sorts device and rack lists by site
name, which starts with the prefix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-09-25 11:10:29 +02:00
1 parent 337cd28c23
commit c7b65f123b
3 files changed
+11 -2

No files matched your search

+2 -1
View File
@@ -104,7 +104,8 @@ def install_site_prefix_column():
accessor=tables.A("site"),
verbose_name="Prefix",
empty_values=(),
orderable=False,
# Der Standortname beginnt mit dem Prefix, sortiert also in derselben Reihenfolge.
order_by=("site__name",),
)
register_table_column(column, COLUMN_NAME, DeviceTable, RackTable)
prepend_to_default_columns(DeviceTable)