Added search filed for student in weekpreference, refuel stop non null default false, migrations
This commit is contained in:
@@ -59,7 +59,7 @@ class ChangeCourseForm(AdminActionForm):
|
||||
class StudentAdmin(ImportMixin, AdminActionFormsMixin, admin.ModelAdmin):
|
||||
list_display = ("surname", "name", "course", "course_color", "email", "phone", "username", "password", "active",)
|
||||
list_filter = ("course", "active",)
|
||||
search_fields= ("surname", "name", "phone", "email",)
|
||||
search_fields = ("surname", "name", "phone", "email",)
|
||||
actions = ("change_course", "disable_students",)
|
||||
resource_classes = [StudentResource]
|
||||
confirm_form_class = StudentCustomConfirmImportForm
|
||||
|
||||
@@ -21,7 +21,8 @@ from datetime import date
|
||||
class WeekPreferenceAdmin(nested_admin.NestedPolymorphicModelAdmin):
|
||||
inlines = (TrainingInLIne, HourBuildingInLine, )
|
||||
list_display = ("week", "student__surname","student__name", "student__course", "course_color", "student_brief_mix",)
|
||||
list_filter = ("week", "student__course", "student",)
|
||||
list_filter = ("week", "student__course",)
|
||||
search_fields = ("student__surname","student__name",)
|
||||
actions = ("export",)
|
||||
|
||||
@admin.action(description="Export Selected Preferences")
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.8 on 2025-11-27 10:56
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('flightslot', '0020_alter_hourbuildinglegbase_options_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='hourbuildinglegstop',
|
||||
name='refuel',
|
||||
field=models.BooleanField(default=False, verbose_name='Stop for Refuelling'),
|
||||
),
|
||||
]
|
||||
@@ -124,8 +124,10 @@ class HourBuildingLegFlight(HourBuildingLegBase):
|
||||
|
||||
class HourBuildingLegStop(HourBuildingLegBase):
|
||||
|
||||
refuel = models.BooleanField(
|
||||
default=False
|
||||
refuel = models.BooleanField (
|
||||
null=False,
|
||||
default=False,
|
||||
verbose_name="Stop for Refuelling"
|
||||
)
|
||||
|
||||
# Change displayed name in the inline form
|
||||
|
||||
Reference in New Issue
Block a user