Skip to main content

Find and inspect a device

Find and inspect a device (dark theme)
Find and inspect a device (light theme)

Drag the divider or use the arrow keys to compare themes.

Find and inspect a device
Find and inspect a device (dark theme)
Find and inspect a device (light theme)

Drag the divider or use the arrow keys to compare themes.

  1. Standalone tabs filter by operating status.
  2. Search matches the equipment code and category name.
  3. The category filter can be combined with a status tab.
  4. The results table includes sortable headings and an actions column.
  5. Below the table, the count and pagination help move through results.
  6. The eye icon opens quick view.
Find and inspect a device

Django Chassis 1.0.23 · training site with Russian UI

  1. Standalone tabs filter by operating status.
  2. Search matches the equipment code and category name.
  3. The category filter can be combined with a status tab.
  4. The results table includes sortable headings and an actions column.
  5. Below the table, the count and pagination help move through results.
  6. The eye icon opens quick view.

How to add it​

In catalog_demo/admins/device_admin.py, declare the columns and Chassis options on DeviceAdmin. The model needs code, the category relation, the active flag and created_at. Register Device with this class on the project AdminSite in catalog_demo/apps.py.

from django.contrib.admin import ModelAdmin
from django_chassis.mixins import ChassisAdminMixin
from django_chassis.options import DateHierarchyOption, FieldTabsOption, FiltersOption, SearchOption

class DeviceAdmin(ChassisAdminMixin, ModelAdmin):
list_display = ['code', 'category', 'active']
list_per_page = 5
options = [
FieldTabsOption(
field='active', choices=[(True, 'В эксплуатации'), (False, 'На обслуживании')],
standalone=True,
),
SearchOption(fields=['code', 'category__name'], placeholder='Номер или категория'),
FiltersOption(fields=['category']),
DateHierarchyOption(field='created_at'),
]

Open the device list and select an operating status together with a category. The result count reflects both conditions.