diff --git a/admin.py b/admin.py index abb8d91..a06e53e 100644 --- a/admin.py +++ b/admin.py @@ -27,15 +27,12 @@ class UserAdmin(BaseUserAdmin): deactivate_account.short_description = "Deactivate selected accounts" - - class PlayerAdmin(admin.ModelAdmin): search_fields = ["username", "uuid"] class ApplicationAdmin(admin.ModelAdmin): search_fields = ["username"] - #date_hierarchy = 'date' class TicketPriorityFilter(admin.SimpleListFilter): @@ -60,7 +57,6 @@ class TicketPriorityFilter(admin.SimpleListFilter): class TicketAdmin(admin.ModelAdmin): search_fields = ["player__username", "staff__username"] - #date_hierarchy = 'date' list_filter = (TicketPriorityFilter,) @@ -86,10 +82,13 @@ class WarningSeverityFilter(admin.SimpleListFilter): class WarningAdmin(admin.ModelAdmin): search_fields = ["player__username", "staff__username"] - #date_hierarchy = 'date' list_filter = (WarningSeverityFilter,) +class IPAdmin(admin.ModelAdmin): + search_fields = ["player__username", "ip"] + + try: admin.site.unregister(User) admin.site.register(User, UserAdmin) @@ -98,7 +97,7 @@ try: admin.site.register(Warning, WarningAdmin) admin.site.register(Ticket, TicketAdmin) admin.site.register(Player, PlayerAdmin) - admin.site.register(IP) + admin.site.register(IP, IPAdmin) admin.site.register(Alert) admin.site.register(Note) except admin.sites.AlreadyRegistered: