added email_sent field to student model, do not send mail twice if not needed

This commit is contained in:
2025-12-10 11:43:04 +01:00
parent 99d24583d6
commit da8c8db0d2
4 changed files with 41 additions and 3 deletions

View File

@@ -69,7 +69,7 @@ class ChangeAircraftForm(AdminActionForm):
class StudentAdmin(ImportMixin, AdminConfirmMixin, AdminActionFormsMixin, admin.ModelAdmin):
model = Student
list_display = ("surname", "name", "course", "course_color", "email", "phone", "username", "password", "active", )
list_display = ("surname", "name", "course", "course_color", "email", "phone", "username", "password", "active", "mail_sent")
list_filter = ("course", "active", )
search_fields = ("surname", "name", "phone", "email", )
actions = ("change_course", "deactivate_students", "change_aircraft", "send_mail", )