from django.contrib import admin
from django.contrib.auth.admin import UserAdmin

from .models import Player, Log
from bloonsa_game.models import LevelRating

@admin.register(Player)
class PlayerAdmin(admin.ModelAdmin):
    # list_display = ("id", "user")
    # These lag too much
    # exclude = ("bloonsa_levels_played", "bloonsa_levels_beaten")

    def get_played_levels(self, obj):
        return obj.bloonsa_levels_played.all()


admin.site.register(LevelRating)
admin.site.register(Log)
