Skip to content

Commit

Permalink
Merge pull request #10535 from edx/clintonb/enrollment-admin-fix
Browse files Browse the repository at this point in the history
Fixed admin issues
  • Loading branch information
clintonb committed Nov 6, 2015
2 parents ee29e11 + afd682e commit 7de9252
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/djangoapps/student/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,20 @@ class CourseEnrollmentAdmin(admin.ModelAdmin):
""" Admin interface for the CourseEnrollment model. """
list_display = ('id', 'course_id', 'mode', 'user', 'is_active',)
list_filter = ('mode', 'is_active',)
raw_id_fields = ('user',)
search_fields = ('course_id', 'mode', 'user__username',)

def queryset(self, request):
return super(CourseEnrollmentAdmin, self).queryset(request).select_related('user')

class Meta(object):
model = CourseEnrollment


class UserProfileAdmin(admin.ModelAdmin):
""" Admin interface for UserProfile model. """
list_display = ('user', 'name',)
raw_id_fields = ('user',)
search_fields = ('user__username', 'user__first_name', 'user__last_name', 'user__email', 'name',)

def get_readonly_fields(self, request, obj=None):
Expand Down

0 comments on commit 7de9252

Please sign in to comment.