From e43e69fa62c3760c3e9fad5288eb6bf9e5c649b1 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Fri, 6 Jun 2025 18:44:47 +0200 Subject: [PATCH] add user staff in custom user admin --- tournaments/admin.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tournaments/admin.py b/tournaments/admin.py index 006ca06..f8f7b60 100644 --- a/tournaments/admin.py +++ b/tournaments/admin.py @@ -25,14 +25,17 @@ class CustomUserAdmin(UserAdmin): list_filter = ['is_active', 'origin'] ordering = ['-date_joined'] fieldsets = [ - (None, {'fields': ['id', 'username', 'email', 'password', 'first_name', 'last_name', 'is_active', 'registration_payment_mode', - 'clubs', 'country', 'phone', 'licence_id', 'umpire_code', + (None, {'fields': ['id', 'username', 'email', 'password', 'first_name', 'last_name', 'is_active']}), + ('Permissions', {'fields': ['is_staff', 'is_superuser', 'groups', 'user_permissions']}), + ('Personal Info', {'fields': ['registration_payment_mode', 'clubs', 'country', 'phone', 'licence_id', 'umpire_code']}), + ('Tournament Settings', {'fields': [ 'summons_message_body', 'summons_message_signature', 'summons_available_payment_methods', 'summons_display_format', 'summons_display_entry_fee', 'summons_use_full_custom_message', 'match_formats_default_duration', 'bracket_match_format_preference', 'group_stage_match_format_preference', - 'loser_bracket_match_format_preference', 'device_id', 'loser_bracket_mode', 'groups', 'origin', 'agents', 'should_synchronize' + 'loser_bracket_match_format_preference', 'device_id', 'loser_bracket_mode', 'origin', 'agents', 'should_synchronize' ]}), - ] + ] + add_fieldsets = [ ( None,