feat: add admin for the User Celebration Model
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user