mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-04 22:40:30 +00:00
Show only part of part_student in StudentView
This commit is contained in:
parent
872ce5dcc1
commit
a8eee63b9e
2 changed files with 7 additions and 1 deletions
|
@ -40,6 +40,7 @@ from .admin_link_formatters import (
|
|||
group_formatter,
|
||||
part_formatter,
|
||||
part_student_formatter,
|
||||
part_student_part_formatter,
|
||||
part_with_semester_formatter,
|
||||
program_formatter,
|
||||
semester_experiment_formatter,
|
||||
|
@ -423,7 +424,7 @@ class StudentView(SecureAdminModelView):
|
|||
column_formatters = {
|
||||
"uni_email": email_formatter,
|
||||
"contact_email": email_formatter,
|
||||
"part_students": part_student_formatter,
|
||||
"part_students": part_student_part_formatter,
|
||||
}
|
||||
|
||||
form_excluded_columns = [
|
||||
|
|
|
@ -5,6 +5,11 @@ def str_without_semester_attr_formatter(attr):
|
|||
return attr.str_without_semester()
|
||||
|
||||
|
||||
def part_student_part_attr_formatter(attr):
|
||||
return attr.part
|
||||
|
||||
|
||||
part_student_part_formatter = link_formatter_factory("admin_part_student", part_student_part_attr_formatter)
|
||||
part_student_formatter = link_formatter_factory("admin_part_student")
|
||||
|
||||
student_formatter = link_formatter_factory("admin_student")
|
||||
|
|
Loading…
Reference in a new issue