Commit 00578a0c by Will Daly

Prevent Django admin from loading all users for verify student models.

parent 93faba00
......@@ -14,6 +14,7 @@ class SoftwareSecurePhotoVerificationAdmin(admin.ModelAdmin):
"""
list_display = ('id', 'user', 'status', 'receipt_id', 'submitted_at', 'updated_at')
exclude = ('window',) # TODO: Remove after deleting this field from the model.
raw_id_fields = ('user',)
search_fields = (
'receipt_id',
)
......@@ -25,6 +26,7 @@ class VerificationStatusAdmin(admin.ModelAdmin):
"""
list_display = ('timestamp', 'user', 'status', 'checkpoint', 'location_id')
readonly_fields = ()
raw_id_fields = ('user',)
search_fields = ('checkpoint', 'user')
def get_readonly_fields(self, request, obj=None):
......@@ -47,6 +49,7 @@ class VerificationStatusAdmin(admin.ModelAdmin):
class SkippedReverificationAdmin(admin.ModelAdmin):
"""Admin for the SkippedReverification table. """
list_display = ('created_at', 'user', 'course_id', 'checkpoint')
raw_id_fields = ('user',)
readonly_fields = ('user', 'course_id')
search_fields = ('user', 'course_id', 'checkpoint')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment