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]
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.