Skip to content
Snippets Groups Projects
Unverified Commit f7e986f3 authored by Matthew Piatetsky's avatar Matthew Piatetsky Committed by GitHub
Browse files

Merge pull request #27746 from edx/expose_streak_celebration_to_django_admin

[AA-759] feat: add admin for the User Celebration Model
parents 31f66a4f 8978bc26
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment