nautobot.apps.admin - Nautobot Documentation

Skip to content

# `nautobot.apps.admin`

Utilities for integrating with the Nautobot Admin UI.

## `nautobot.apps.admin.NautobotModelAdmin`

Bases: `ModelAdmin`

Extend Django's ModelAdmin to use some standard Nautobot UI widgets by default.

Source code in `nautobot/core/admin.py`

    53
    54
    55
    56
    57
    58
    59
    60
    class NautobotModelAdmin(ModelAdmin):
        """Extend Django's ModelAdmin to use some standard Nautobot UI widgets by default."""

        formfield_overrides = {
            models.DateField: {"widget": widgets.DatePicker},
            models.ForeignKey: {"widget": widgets.StaticSelect2},
            models.ManyToManyField: {"widget": widgets.StaticSelect2Multiple},
        }