|
|
|
|
@ -37,12 +37,14 @@ class CustomUserAdmin(UserAdmin): |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
class EventAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['tenup_id', 'creation_date', 'name', 'club', 'creator'] |
|
|
|
|
list_display = ['creation_date', 'name', 'club', 'creator', 'tenup_id'] |
|
|
|
|
list_filter = ['creator', 'tenup_id'] |
|
|
|
|
ordering = ['-creation_date'] |
|
|
|
|
|
|
|
|
|
class TournamentAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['display_name', 'event', 'is_private', 'start_date', 'payment', 'is_canceled'] |
|
|
|
|
list_display = ['display_name', 'event', 'is_private', 'start_date', 'payment', 'event__creator'] |
|
|
|
|
list_filter = ['is_deleted', 'event__creator'] |
|
|
|
|
ordering = ['-start_date'] |
|
|
|
|
|
|
|
|
|
class TeamRegistrationAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['player_names', 'group_stage_position', 'name', 'tournament'] |
|
|
|
|
@ -56,30 +58,37 @@ class RoundAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['tournament', 'name', 'index', 'parent'] |
|
|
|
|
list_filter = [SimpleTournamentListFilter, SimpleIndexListFilter] |
|
|
|
|
search_fields = ['id'] |
|
|
|
|
ordering = ['parent'] |
|
|
|
|
|
|
|
|
|
class PlayerRegistrationAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['first_name', 'last_name', 'licence_id', 'rank'] |
|
|
|
|
search_fields = ('first_name', 'last_name') |
|
|
|
|
list_filter = [TeamScoreTournamentListFilter] |
|
|
|
|
ordering = ['last_name', 'first_name'] |
|
|
|
|
|
|
|
|
|
class MatchAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['__str__', 'round', 'group_stage', 'start_date', 'index'] |
|
|
|
|
list_filter = [MatchTypeListFilter, MatchTournamentListFilter, SimpleIndexListFilter] |
|
|
|
|
ordering = ['-group_stage', 'round'] |
|
|
|
|
|
|
|
|
|
class GroupStageAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['tournament', 'index', 'start_date'] |
|
|
|
|
list_display = ['tournament', 'start_date', 'index'] |
|
|
|
|
list_filter = [SimpleTournamentListFilter] |
|
|
|
|
ordering = ['-start_date', 'index'] |
|
|
|
|
|
|
|
|
|
class ClubAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['name', 'acronym', 'city', 'creator', 'events_count', 'broadcast_code'] |
|
|
|
|
search_fields = ('name', 'acronym') |
|
|
|
|
ordering = ['creator'] |
|
|
|
|
|
|
|
|
|
class PurchaseAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['id', 'user', 'product_id', 'quantity', 'purchase_date', 'revocation_date', 'expiration_date'] |
|
|
|
|
list_filter = ['user'] |
|
|
|
|
ordering = ['user', 'product_id'] |
|
|
|
|
|
|
|
|
|
class CourtAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['index', 'name', 'club'] |
|
|
|
|
ordering = ['club'] |
|
|
|
|
|
|
|
|
|
class DateIntervalAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['court_index', 'event'] |
|
|
|
|
|