Skip to content

Commit

Permalink
Added search functionality for admins for group gsrs (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
judtinzhang authored Sep 7, 2023
1 parent e591e16 commit 7c119e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/gsr_booking/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
from gsr_booking.models import GSR, Group, GroupMembership, GSRBooking, Reservation


class GroupMembershipAdmin(admin.ModelAdmin):
search_fields = ["user__username__icontains", "group__name__icontains"]


admin.site.register(Group)
admin.site.register(GroupMembership)
admin.site.register(GroupMembership, GroupMembershipAdmin)
admin.site.register(GSR)
admin.site.register(GSRBooking)
admin.site.register(Reservation)

0 comments on commit 7c119e0

Please sign in to comment.