Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
test: revert admin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Soban Javed committed Oct 9, 2023
1 parent beabb56 commit 2630fda
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions registrar/apps/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
)


@admin.register(User)
class CustomUserAdmin(UserAdmin):
""" Admin configuration for the custom User model. """
list_display = ('id', 'username', 'email', 'full_name', 'first_name', 'last_name', 'is_staff')
Expand All @@ -29,7 +28,6 @@ class CustomUserAdmin(UserAdmin):
)


@admin.register(UserGroup)
class UserGroupAdmin(UserAdmin):
"""
Admin configuration for the UserGroup model. UserGroup is just a proxy to
Expand All @@ -42,7 +40,6 @@ class UserGroupAdmin(UserAdmin):
)


@admin.register(Organization)
class OrganizationAdmin(GuardedModelAdmin):
list_display = ('key', 'name', 'discovery_uuid')
search_fields = ('key', 'name', 'discovery_uuid')
Expand All @@ -59,7 +56,6 @@ def group_users(self, obj):
return ", ".join([user.username for user in User.objects.filter(groups__name=obj.name)])


@admin.register(OrganizationGroup)
class OrganizationGroupAdmin(GroupAdmin):
"""
Admin tool for the OrganizationGroup model
Expand All @@ -72,14 +68,12 @@ class OrganizationGroupAdmin(GroupAdmin):
exclude = ('permissions',)


@admin.register(PendingUserGroup)
class PendingUserGroupAdmin(admin.ModelAdmin):
list_display = ("group", "user_email")
search_fields = ("group__name", "user_email")
ordering = ("group", "user_email")


@admin.register(Program)
class ProgramAdmin(admin.ModelAdmin):
"""
Admin tool for the ProgramEnrollment model
Expand All @@ -89,7 +83,6 @@ class ProgramAdmin(admin.ModelAdmin):
ordering = ("managing_organization", "key")


@admin.register(ProgramOrganizationGroup)
class ProgramGroupAdmin(GroupAdmin):
"""
Admin tool for the ProgramOrganizationGroup model
Expand All @@ -102,3 +95,10 @@ class ProgramGroupAdmin(GroupAdmin):
exclude = ('permissions', )


admin.site.register(User, CustomUserAdmin)
admin.site.register(UserGroup, UserGroupAdmin)
admin.site.register(Organization, OrganizationAdmin)
admin.site.register(OrganizationGroup, OrganizationGroupAdmin)
admin.site.register(PendingUserGroup, PendingUserGroupAdmin)
admin.site.register(Program, ProgramAdmin)
admin.site.register(ProgramOrganizationGroup, ProgramGroupAdmin)

0 comments on commit 2630fda

Please sign in to comment.