# Card

Below is an example configuration of a panel using the **Card** module:

```python
{
    "title": "Supplier Information",
    "full_row": True,
    "url_name": "frame_board",
    "url_action_name": "panel_supplierparent_card",
    "width": 6,
    "reload_div": True,
    "content": {
        "view": module_views.Board,
        "url_params_list": [{"pk": "int"}],
        "view_params": {
            "model": custom_models.SupplierParent,
            "limit": 1,
            "cards_per_row": 1,
            "url_name": "panel_supplierparent_card",
            "board_wrapper": False,
            "field_definitions": {
                "footer_settings": {
                    "footer": True,
                    "allowed_user_groups": [
                        "Superuser",
                    ],
                },
                "bg_class_mapping": {
                    "success": {"is_active": True},
                    "danger": {"is_active": False},
                },
                "heading_fields": {
                    "title_field_name": "name",
                },
                "group_items": [
                    {
                        "label": "Active",
                        "field_name": "is_active",
                        "format": "input",
                        "input_type": "dropdown",
                        "select_options": [
                            {"label": "Yes", "value": True},
                            {"label": "No", "value": False},
                        ],
                        "mapping": {
                            True: "Yes",
                            False: "No",
                        },
                        "allowed_user_groups": [
                            "Superuser",
                        ],
                    },
                ],
            },
        },
    },
},
```

The **view\_params** are:

* **model**: The model shown in the card
* **url\_name**: Unique reference for the panel
* field\_definition:
  * **footer\_setting**: Basic setting for the footer such as privilege
  * **bg\_class\_setting**: The setting of the background
    * **success**: The background is green when the field is **True**
    * **danger:** The background is red when the field is **False**
  * **heading\_field**: The heading of the card&#x20;
  * **group\_items**:&#x20;
    * **label:** The heading of the field in the card
    * fi**eld\_name:** The field in the model
    * **format:** The format of the input box
    * **input:** The input type
    * **select\_options:** The option of the input
    * **mapping:** The mapping of the options
    * **allowed\_user\_group:** The user group who can see the content

<figure><img src="/files/DMSvc3lGNy1K7ajkswp6" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lineverge.com/automail/configurations/ui-configuration/site/panels/card.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
