|
|
|
|
@ -62,6 +62,12 @@ class TeamScoreAdmin(admin.ModelAdmin): |
|
|
|
|
list_filter = [TeamScoreTournamentListFilter] |
|
|
|
|
search_fields = ['id'] |
|
|
|
|
raw_id_fields = ['team_registration', 'match'] # Add this line |
|
|
|
|
list_per_page = 50 # Controls pagination on the list view |
|
|
|
|
readonly_fields = ['team_registration', 'match'] # Make this field read-only in the edit form |
|
|
|
|
|
|
|
|
|
def get_queryset(self, request): |
|
|
|
|
qs = super().get_queryset(request) |
|
|
|
|
return qs.select_related('team_registration', 'match') |
|
|
|
|
|
|
|
|
|
class RoundAdmin(admin.ModelAdmin): |
|
|
|
|
list_display = ['tournament', 'name', 'index', 'parent'] |
|
|
|
|
|