unfold-admin
БесплатноБез исполняемых скриптовНе проверенDjango Unfold admin theme for modern Django admin interfaces. Use when working with: Django admin UI customisation or theming; Unfold ModelAdmin, inlines…
от 0xDarkMatter★ 86 звёзд на GitHubОб этом скилле
Django Unfold Admin
Modern Django admin theme with Tailwind CSS, HTMX, and Alpine.js. Replaces Django's default admin with a polished, feature-rich interface.
Quick Start
Installation
# settings.py - unfold MUST be before django.contrib.admin
INSTALLED_APPS = [
"unfold",
"unfold.contrib.filters", # advanced filters
"unfold.contrib.forms", # array/wysiwyg widgets
"unfold.contrib.inlines", # nonrelated inlines
"unfold.contrib.import_export", # styled import/export
"unfold.contrib.guardian", # django-guardian integration
"unfold.contrib.simple_history", # django-simple-history integration
"unfold.contrib.constance", # django-constance integration
"unfold.contrib.location_field", # django-location-field integration
# ...
"django.contrib.admin",
]
Minimal Admin
from unfold.admin import ModelAdmin
@admin.register(MyModel)
class MyModelAdmin(ModelAdmin):
pass # inherits Unfold styling
Site Configuration
Replace the default AdminSite or configure via UNFOLD dict in settings. See references/configuration.md for the complete settings reference.
UNFOLD = {
"SITE_TITLE": "My Admin",
"SITE_HEADER": "My Admin",
"SITE_SYMBOL": "dashboard", # Material Symbols icon name
"SIDEBAR": {
"show_search": True,
"navigation": [
{
"title": _("Navigation"),
"items": [
{
"title": _("Dashboard"),
"icon": "dashboard",
"link": reverse_lazy("admin:index"),
},
],
},
],
},
}
Core Workflow
When building Unfold admin interfaces, follow this sequence:
- Configure site - UNFOLD settings dict (branding, sidebar, theme)
- Register models - Extend
unfold.admin.ModelAdmin - Enhance display -
@displaydecorator for list columns - Add actions -
@actiondecorator for row/list/detail/submit actions - Configure filters - Replace default filters with Unfold filter classes
- Override widgets - Apply Unfold widgets via
formfield_overrides - Set up inlines - Use Unfold's inline classes with tabs, pagination, sorting
- Build dashboard -
@register_component+BaseComponentfor KPI cards
ModelAdmin Attributes
Unfold extends Django's ModelAdmin with these additional attributes:
| Attribute | Type | Purpose |
|---|---|---|
list_fullwidth |
bool | Full-width changelist (no sidebar) |
list_filter_submit |
bool | Add submit button to filters |
list_filter_sheet |
bool | Filters in sliding sheet panel |
compressed_fields |
bool | Compact field spacing in forms |
warn_unsaved_form |
bool | Warn before leaving unsaved form |
ordering_field |
str | Field name for drag-to-reorder |
hide_ordering_field |
bool | Hide the ordering field column |
list_horizontal_scrollbar_top |
bool | Scrollbar at top of list |
list_disable_select_all |
bool | Disable "select all" checkbox |
change_form_show_cancel_button |
bool | Show cancel button on form |
actions_list |
list | Global changelist actions |
actions_row |
list | Per-row actions in changelist |
actions_detail |
list | Actions on change form |
actions_submit_line |
list | Actions in form submit area |
actions_list_hide_default |
bool | Hide default list actions |
actions_detail_hide_default |
bool | Hide default detail actions |
conditional_fields |
dict | JS expressions for field visibility |
change_form_datasets |
list | BaseDataset subclasses for change form |
list_sections |
list | TableSection/TemplateSection for list |
list_sections_classes |
str | CSS grid classes for sections |
readonly_preprocess_fields |
dict | Transform readonly field content |
add_fieldsets |
list | Separate fieldsets for add form (like UserAdmin) |
Template Injection Points
Insert custom HTML before/after changelist or change form:
class MyAdmin(ModelAdmin):
# Changelist
list_before_template = "myapp/list_before.html"
list_after_template = "myapp/list_after.html"
# Change form (inside <form> tag)
change_form_before_template = "myapp/form_before.html"
change_form_after_template = "myapp/form_after.html"
# Change form (outside <form> tag)
change_form_outer_before_template = "myapp/outer_before.html"
change_form_outer_after_template = "myapp/outer_after.html"
Conditional Fields
Show/hide fields based on other field values (Alpine.js expressions):
class MyAdmin(ModelAdmin):
conditional_fields = {
"premium_features": "plan == 'PRO'",
"discount_amount": "has_discount == true",
}
Actions System
Four action types, each with different signatures. See [referen
Установить unfold-admin в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл unfold-admin?
Django Unfold admin theme for modern Django admin interfaces. Use when working with: Django admin UI customisation or theming; Unfold ModelAdmin, inlines, actions, filters, widgets, decorators; admin dashboard components, KPI cards, datasets; sidebar navigation, tabs, sections, conditional fields; site configuration, third-party integrations; any mention of 'unfold', 'django-unfold', 'unfold admin'.
Как установить скилл unfold-admin?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл unfold-admin запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic