Skip to content

Commit 6e5c967

Browse files
committed
add some helpful marking session filtering to admin
1 parent 7395d60 commit 6e5c967

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

crowdsourcer/admin.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ class AssignedAdmin(admin.ModelAdmin):
2323
"response_type",
2424
)
2525
search_fields = ["user__username", "authority__name"]
26-
list_filter = ["section", "authority__questiongroup", "response_type", "active"]
26+
list_filter = [
27+
"section__marking_session",
28+
"section",
29+
"authority__questiongroup",
30+
"response_type",
31+
"active",
32+
]
2733

2834

2935
@admin.register(Option)
@@ -60,7 +66,7 @@ class QuestionAdmin(admin.ModelAdmin):
6066
"description",
6167
"weighting",
6268
)
63-
list_filter = ["section", "how_marked", "questiongroup"]
69+
list_filter = ["section__marking_session", "section", "how_marked", "questiongroup"]
6470
ordering = ("section", "number", "number_part")
6571

6672

@@ -96,7 +102,12 @@ class ResponseTypeAdmin(admin.ModelAdmin):
96102

97103
@admin.register(Section)
98104
class SectionAdmin(admin.ModelAdmin):
99-
pass
105+
list_display = (
106+
"title",
107+
"marking_session",
108+
)
109+
110+
list_filter = ["marking_session"]
100111

101112

102113
@admin.register(MarkingSession)

0 commit comments

Comments
 (0)