From d7047822845db81abc44e8963f900f9c77dbd852 Mon Sep 17 00:00:00 2001 From: Madison Swain-Bowden Date: Wed, 13 Mar 2024 08:47:58 -0700 Subject: [PATCH] Enable Users and Groups in the Django Admin UI (#3899) --- api/api/admin/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/api/admin/__init__.py b/api/api/admin/__init__.py index dc7eb7ef42f..fcdd24f9df4 100644 --- a/api/api/admin/__init__.py +++ b/api/api/admin/__init__.py @@ -1,4 +1,6 @@ from django.contrib import admin +from django.contrib.auth.admin import GroupAdmin, UserAdmin +from django.contrib.auth.models import Group, User from api.admin.site import openverse_admin from api.models import PENDING, Audio, AudioReport, ContentProvider, Image, ImageReport @@ -9,6 +11,11 @@ admin.sites.site = openverse_admin +# Show User and Group views in the Admin view +admin.site.register(User, UserAdmin) +admin.site.register(Group, GroupAdmin) + + @admin.register(Image) class ImageAdmin(admin.ModelAdmin): search_fields = ("identifier",)