From 712f2dc4d59373c51965e25003f6adb18128c7f9 Mon Sep 17 00:00:00 2001 From: Sushil Khadka Date: Mon, 27 May 2024 11:25:23 +0545 Subject: [PATCH] (hotfix) Exam session decrease query by makeing field readonly, list made status editable --- enrollments/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/enrollments/admin.py b/enrollments/admin.py index e8f5b5db..3c508661 100644 --- a/enrollments/admin.py +++ b/enrollments/admin.py @@ -20,7 +20,8 @@ class ExamThroughEnrollmentInline(admin.TabularInline): model = ExamThroughEnrollment extra = 1 - readonly_fields = ["status"] + readonly_fields = ["status", "enrollment"] + fields = ("enrollment", "score", "negative_score", "status") class CourseThroughEnrollmentInline(admin.TabularInline): @@ -121,6 +122,7 @@ class ExamSessionAdmin(CreatorBaseModelAdmin, admin.ModelAdmin): "help_text": "Seconds doesnot matters", }, } + list_editable = ["status"] date_hierarchy = "created_at" readonly_fields = CreatorBaseModelAdmin.readonly_fields + ["end_date"]