X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4b86e623b0ff7a5a53bdb29df06eab039ebe4e1e..e5f72228d92e58406b43c2a772737535041d28c0:/src/club/admin.py?ds=inline diff --git a/src/club/admin.py b/src/club/admin.py index bfa433006..76cc71ed0 100644 --- a/src/club/admin.py +++ b/src/club/admin.py @@ -20,6 +20,7 @@ class ScheduleAdmin(admin.ModelAdmin): list_search = ['email'] list_filter = ['is_active', 'is_cancelled'] date_hierarchy = 'started_at' + raw_id_fields = ['membership'] inlines = [PaymentInline] admin.site.register(models.Schedule, ScheduleAdmin) @@ -32,7 +33,9 @@ admin.site.register(models.Payment, PaymentAdmin) class MembershipAdmin(admin.ModelAdmin): - pass + list_display = ['user'] + raw_id_fields = ['user'] + search_fields = ['user__username', 'user__email'] admin.site.register(models.Membership, MembershipAdmin)