From 58e0f875553e933a89610f3d66e2c266a6847584 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 3 Sep 2020 11:49:03 +0100 Subject: added EssentialService as an inline on the Org admin page --- ctrack/organisations/admin.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ctrack/organisations') diff --git a/ctrack/organisations/admin.py b/ctrack/organisations/admin.py index d3e6284..02b02ef 100644 --- a/ctrack/organisations/admin.py +++ b/ctrack/organisations/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin -from ctrack.caf.models import CAF +from ctrack.caf.models import CAF, EssentialService from .models import ( Address, @@ -47,8 +47,14 @@ class AddressInLine(admin.StackedInline): extra = 1 +class EssentialServiceInline(admin.StackedInline): + model = EssentialService + max_num = 3 + extra = 1 + + class OrganisationAdmin(admin.ModelAdmin): - inlines = [AddressInLine] + inlines = [AddressInLine, EssentialServiceInline] list_display = ("name", "submode", "date_updated") -- cgit v1.2.3