diff --git a/accounts/admin.py b/accounts/admin.py index ca76cdd..e85a488 100644 --- a/accounts/admin.py +++ b/accounts/admin.py @@ -30,7 +30,7 @@ admin.site.register(EmailConfirmation, ConfirmationAdmin) class EmailAdmin(admin.ModelAdmin): list_display = ['when', 'recipient_display', 'subject', 'sender_display', 'ok',] - list_filter = ['ok', 'when', 'sender'] + list_filter = ['ok', 'when', ('sender', admin.RelatedOnlyFieldListFilter)] readonly_fields = ['when', 'email', 'subject', 'body', 'ok'] search_fields = ['subject', 'body', 'to'] diff --git a/events/admin.py b/events/admin.py index 41a85dd..0cbe79e 100644 --- a/events/admin.py +++ b/events/admin.py @@ -57,7 +57,7 @@ admin.site.register(Organization, OrgAdmin) class TeamAdmin(admin.ModelAdmin): raw_id_fields = ('country', 'spr', 'city', 'owner_profile', 'admin_profiles', 'contact_profiles') list_display = ('__str__', 'active', 'member_count', 'event_count', 'owner_profile', 'created_date', 'is_premium', 'premium_expires') - list_filter = ('active', 'is_premium', 'organization', 'country',) + list_filter = ('active', 'is_premium', 'organization', ('country',admin.RelatedOnlyFieldListFilter)) ordering = ('-created_date',) def member_count(self, team): return team.members.all().count()