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`

    55
    56
    57
    58
    59
    60
    61
    62
    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},
        }