You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-1Lines changed: 52 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,8 @@ Did you decide to start using Unfold but you don't have time to make the switch
30
30
-**WYSIWYG:** built-in support for WYSIWYG (Trix)
31
31
-**Custom filters:** widgets for filtering number & datetime values
32
32
-**Dashboard:** custom components for rapid dashboard development
33
-
-**Tabs:** define custom tab navigations for models
33
+
-**Model tabs:** define custom tab navigations for models
34
+
-**Fieldset tabs:** merge several fielsets into tabs in change form
34
35
-**Colors:** possibility to override default color scheme
35
36
-**Third party packages:** default support for multiple popular applications
36
37
-**Environment label**: distinguish between environments by displaying a label
@@ -50,6 +51,7 @@ Did you decide to start using Unfold but you don't have time to make the switch
50
51
-[Numeric filters](#numeric-filters)
51
52
-[Date/time filters](#datetime-filters)
52
53
-[Display decorator](#display-decorator)
54
+
-[Change form tabs](#change-form-tabs)
53
55
-[Third party packages](#third-party-packages)
54
56
-[django-celery-beat](#django-celery-beat)
55
57
-[django-guardian](#django-guardian)
@@ -582,6 +584,55 @@ class UserAdmin(ModelAdmin):
582
584
return"First main heading", "Smaller additional description", "AB"
583
585
```
584
586
587
+
## Change form tabs
588
+
589
+
When the change form contains a lot of fieldsets, sometimes it is better to group them into tabs so it will not be needed to scroll. To mark a fieldset for tab navigation it is required to add a `tab` CSS class to the fieldset. Once the fieldset contains `tab` class it will be recognized in a template and grouped into tab navigation. Each tab must contain its name. If the name is not available, it will be not included in the tab navigation.
590
+
591
+
```python
592
+
# admin.py
593
+
594
+
from django.contrib import admin
595
+
from django.utils.translation import gettext_lazy as _
0 commit comments