1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-20 23:41:20 +00:00

Add search to AssistantExperimentMarkView

This commit is contained in:
Mo 2022-05-30 04:29:02 +02:00
parent a5fe640b0d
commit 720f1c1193
2 changed files with 11 additions and 1 deletions

View file

@ -375,7 +375,10 @@ class PartView(SecureAdminModelView):
"number": {"widget": NumberInput(min=1)}, "number": {"widget": NumberInput(min=1)},
} }
column_searchable_list = ["program.label", "number"] column_searchable_list = [
"program.label",
"number",
]
def query_modifier(self, query): def query_modifier(self, query):
return query.where(Part.semester == current_user.active_semester) return query.where(Part.semester == current_user.active_semester)

View file

@ -92,6 +92,13 @@ class AssistantExperimentMarkView(SecureAssistantModelView):
"admin": "The last admin who edited the mark", "admin": "The last admin who edited the mark",
} }
column_searchable_list = [
"part_student.student.first_name",
"part_student.student.last_name",
"part_student.student.uni_email",
"part_student.student.contact_email",
]
column_editable_list = [ column_editable_list = [
"oral_mark", "oral_mark",
"protocol_mark", "protocol_mark",