Added hidden family admin view
This commit is contained in:
@@ -257,6 +257,15 @@ class TravellerAdmin(MyImportExportModelAdmin, CloneModelAdmin, TravellerRollMix
|
||||
# super().save_model(request, obj, form, change)
|
||||
|
||||
|
||||
# @admin.register(Family)
|
||||
class FamilyAdmin(MyImportExportModelAdmin, admin.ModelAdmin):
|
||||
list_display = ["traveller", "__str__",
|
||||
"parent_A_firstname", "parent_A_lastname", "parent_A_phone",
|
||||
"parent_B_firstname", "parent_B_lastname", "parent_B_phone",
|
||||
"emergency_contact_A_firstname", "emergency_contact_A_lastname", "emergency_contact_A_phone",
|
||||
"emergency_contact_B_firstname", "emergency_contact_B_lastname", "emergency_contact_B_phone"]
|
||||
|
||||
|
||||
# @admin.register(TravellerRoute)
|
||||
class TravellerRouteAdmin(MyImportExportModelAdmin, admin.ModelAdmin):
|
||||
list_display = ["traveller", "busStop"]
|
||||
|
||||
@@ -315,6 +315,9 @@ class Family(models.Model):
|
||||
emergency_contact_B_phone = models.CharField(max_length=15, blank=True)
|
||||
emergency_contact_B_relation = models.CharField(max_length=50, choices=RELATIONS, blank=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = "Families"
|
||||
|
||||
def __str__(self):
|
||||
return self.parent_names()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user