Skip to content

Commit

Permalink
Enable Users and Groups in the Django Admin UI (#3899)
Browse files Browse the repository at this point in the history
  • Loading branch information
AetherUnbound authored Mar 13, 2024
1 parent 4176f6e commit d704782
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/api/admin/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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",)
Expand Down

0 comments on commit d704782

Please sign in to comment.