From a78bb6bd4ccd96bbdb153cf9fc1b83632ccaa276 Mon Sep 17 00:00:00 2001 From: MR Lemon Date: Thu, 16 Apr 2020 17:16:00 +0100 Subject: layout of CAF list --- ctrack/caf/models.py | 5 ++++- ctrack/caf/templates/caf/caf_list.html | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 ctrack/caf/templates/caf/caf_list.html (limited to 'ctrack/caf') diff --git a/ctrack/caf/models.py b/ctrack/caf/models.py index 5d7b5b0..0151d4b 100644 --- a/ctrack/caf/models.py +++ b/ctrack/caf/models.py @@ -92,7 +92,10 @@ class CAF(models.Model): def organisation(self): first_ass = ApplicableSystem.objects.filter(caf=self).first() return first_ass.organisation - + + def sub_mode(self): + return self.organisation().submode + def __str__(self): # Get the organisation and applicable system ass = ApplicableSystem.objects.filter(caf=self).first() diff --git a/ctrack/caf/templates/caf/caf_list.html b/ctrack/caf/templates/caf/caf_list.html new file mode 100644 index 0000000..f14b34f --- /dev/null +++ b/ctrack/caf/templates/caf/caf_list.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% load static %} + +{% block title %} CAFs {% endblock %} +{% block content %} + +
+
+

CAFs in system

+
+ + {% for caf in object_list %} +
+
+
+
+
{{ caf.organisation.name }}_{{ caf.version }} | {{ caf.sub_mode }}
+

Bobbins text here

+ Go somewhere +
+
+
+
+ {% endfor %} +
+ +{% endblock %} -- cgit v1.2.3