24 lines
699 B
Python
24 lines
699 B
Python
from django.contrib import admin
|
|
|
|
from .models import PlayerSeason, PlayerSeasonStats
|
|
|
|
|
|
@admin.register(PlayerSeason)
|
|
class PlayerSeasonAdmin(admin.ModelAdmin):
|
|
list_display = ("player", "season", "team", "competition", "games_played", "minutes_played")
|
|
list_filter = ("season", "competition")
|
|
search_fields = ("player__full_name", "team__name", "competition__name", "season__label")
|
|
|
|
|
|
@admin.register(PlayerSeasonStats)
|
|
class PlayerSeasonStatsAdmin(admin.ModelAdmin):
|
|
list_display = (
|
|
"player_season",
|
|
"points",
|
|
"rebounds",
|
|
"assists",
|
|
"usage_rate",
|
|
"true_shooting_pct",
|
|
)
|
|
search_fields = ("player_season__player__full_name",)
|