diff --git a/common/djangoapps/student/admin.py b/common/djangoapps/student/admin.py index 88bcaf4d64c1e21af76c94c36cf74ddfd58a80da..a5ead71d04201d2b47a7eec25f0d8452ff500fc5 100644 --- a/common/djangoapps/student/admin.py +++ b/common/djangoapps/student/admin.py @@ -41,6 +41,7 @@ from common.djangoapps.student.models import ( Registration, RegistrationCookieConfiguration, UserAttribute, + UserCelebration, UserProfile, UserTestGroup ) @@ -538,6 +539,19 @@ class CourseEnrollmentCelebrationAdmin(DisableEnrollmentAdminMixin, admin.ModelA user.short_description = 'User' +@admin.register(UserCelebration) +class UserCelebrationAdmin(admin.ModelAdmin): + """Admin interface for the UserCelebration model.""" + readonly_fields = ('user', ) + + class Meta: + model = UserCelebration + + # Disables the index view to avoid possible performance issues when + # a large number of user celebrations are present. + def has_module_permission(self, request): + return False + admin.site.register(UserTestGroup) admin.site.register(Registration) admin.site.register(PendingNameChange)