layers Introducing Unfold components - Pre-made HTML blocks in Django admin for custom dashboards arrow_forward

Inlines

Unfold inlines are derived from Django inlines, and they are used to add extra styling and configuration options. Native inline classes StackedInline and TabularInline are going work but the styling will not match default Unfold design thus it is recommended to use inlines derived from Unfold.

# admin.py

from django.contrib import admin
from django.contrib.auth.models import User
from unfold.admin import StackedInline, TabularInline


class MyStackedInline(StackedInline):
    model = User


class MyTabularInline(TabularInline):
    model = User


@admin.register(User)
class UserAdmin(ModelAdmin):
    inlines = [MyStackedInline, MyTabularInline]

Be first to know about new features and updates

Each time something new happens in Unfold, like new major features or new design components, we'll send you a newsletter. We promise not to spam you.

Django admin theme built with Tailwind CSS to bring modern look and feel to your admin interface. Already contains several built-in features for smooth developer experience.

© 2023 - 2024 Created by unfoldadmin.com. All rights reserved.