November 2015
Beginner to intermediate
840 pages
26h 30m
English
We can use the fieldsets attribute to take control of the output of the forms in both the add and edit pages of our admin, as shown in Example 23.24.
Example 23.24: Project Code
7 class UserAdmin(admin.ModelAdmin): . ... 22 # form view 23 fieldsets = ( 24 (None, {'fields': ('email', 'password')}), 25 ('Permissions', { 26 'fields': ( 27 'is_active', 28 'is_staff', 29 'is_superuser', 30 'groups', 31 'user_permissions')}), 32 ('Important dates', { 33 'fields' : (
Read now
Unlock full access