|
|
|
|
@ -17,6 +17,7 @@ class CustomUserAdmin(UserAdmin): |
|
|
|
|
add_form = CustomUserCreationForm |
|
|
|
|
model = CustomUser |
|
|
|
|
list_display = ['email', 'username', 'is_active', 'is_staff', 'first_name', 'last_name', 'date_joined', 'event_count'] |
|
|
|
|
ordering = ['-date_joined'] |
|
|
|
|
fieldsets = [ |
|
|
|
|
(None, {'fields': ['id', 'username', 'email', 'password', 'first_name', 'last_name', 'is_active', |
|
|
|
|
'clubs', 'country', 'phone', 'licence_id', 'umpire_code', |
|
|
|
|
@ -84,7 +85,7 @@ class ClubAdmin(admin.ModelAdmin): |
|
|
|
|
class PurchaseAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['id', 'user', 'product_id', 'quantity', 'purchase_date', 'revocation_date', 'expiration_date'] |
|
|
|
|
list_filter = ['user'] |
|
|
|
|
ordering = ['user', 'product_id'] |
|
|
|
|
ordering = ['-purchase_date'] |
|
|
|
|
|
|
|
|
|
class CourtAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['index', 'name', 'club'] |
|
|
|
|
|