Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Dec 21, 2023
2 parents f54d76d + 96178ba commit a46792c
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,28 @@ class LogicPuzzleAdmin(admin.ModelAdmin):
class TeamAdmin(admin.ModelAdmin):
readonly_fields = ("path",)
inlines = [InviteInLine, TeamMemberInline]
search_fields = ("name", "members__username", "members__first_name", "members__last_name")
list_display = ("name", "hunt", "current_qr_i", "member_count",)
search_fields = (
"name",
"members__username",
"members__first_name",
"members__last_name",
)
list_display = (
"name",
"hunt",
"current_qr_i",
"member_count",
)
list_filter = ("hunt__name",)
ordering = ("hunt", "current_qr_i",)

ordering = (
"hunt",
"current_qr_i",
)

@staticmethod
def member_count(obj):
return obj.members.count()

@admin.display(description="The path that the team has/completed")
def path(self, team):
lines = []
Expand Down

0 comments on commit a46792c

Please sign in to comment.