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

Custom title

By default, the title available for each inline row is coming from the __str__ implementation of the model. Unfold allows you to override this title by implementing get_inline_title on the model which can return your own custom title just for the inline.

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


class User(models.Model):
    # fiels, meta ...

    def get_inline_title(self):
        return "Custom title"


class MyInline(TabularInline):
    model = User

Hide title row

By applying hide_title attribute set to True, it is possible to hide the title row which is available for StackedInline or TabularInline. For StackedInline it is required to have disabled delete permission can_delete to be able to hide the title row, because the checkbox with the delete action is inside this title.

# admin.py

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


class MyInline(TabularInline):
    model = User
    hide_title = True

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.