📫
Automail
  • Introduction
  • Installation
    • Local DEV
    • Containerized PROD
    • Windows PROD
  • Repository
  • Architecture
  • Configurations
    • Settings
    • UI Configuration
      • Site
        • Selectpickers
          • Filter
          • Tokenfield
        • Panels
          • ChartJS
          • Amcharts
          • Table
          • Regular Table
          • Metrics
          • Gallery
          • LeafletMap
          • Itemlist
          • Card
          • Downloads
      • Admin
    • Workflow Configuration
      • Sync Workflows
        • Autoform Nav Elements
      • Custom Workflows
      • Dags
Powered by GitBook
On this page
  1. Configurations
  2. UI Configuration
  3. Site
  4. Selectpickers

Filter

Using selectpickers to filter the table below.

PreviousSelectpickersNextTokenfield

Last updated 7 months ago

1. filters

{
    "label": "Chain of Custody",
    "icon": "mdi mdi-link-variant",
    "url_name": "grid_chain_of_custody",
    "children": None,
    "allowed_user_groups": [
        "grp-chain-of-custody-rw",
        "grp-chain-of-custody-r",
    ],
    "allowed_users": [],
    "view": controller_views.GridView,
    "view_params": {
        "title": "Chain of Custody",
        "selectpickers_columns": 4,
        "selectpickers": [
            {
                "name": "supplier_id",
                "label": "Factory/Facility Name",
                "category": "filter",
                "live_search": True,
                "action_box": True,
                "multiple": True,
                "queryset": {
                    "model": custom_models.Supplier,
                    "value_field": "id",
                    "label_field": "name",
                },
            },
            ....
        ],
    },
},

The parameters in the selecpickers are:

  • name: The field name in the model

  • label: The label shown in the selectpickers in automail

  • category: filter category

  • multiple: Whether multiple choices are allowed in the filters

  • queryset: Provided the model details.