From a47f71efc9a7643be548f7f805e162a1942d3db4 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 15 Oct 2024 14:28:30 +0100 Subject: More CSS improvements and wip on profile page - uses dividers between divs which I'm not sure I like - etc --- engagements/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engagements') diff --git a/engagements/models.py b/engagements/models.py index bb1d2bd..7aa361e 100644 --- a/engagements/models.py +++ b/engagements/models.py @@ -5,8 +5,6 @@ from django.db import models from django.db.models import Q from django.utils.text import slugify -from myuser.models import TeamUser - ES_YEAR_LENGTH = 3 @@ -145,7 +143,7 @@ class Engagement(Common): proposed_end_date = models.DateField(null=True, blank=True) engagement_type = models.ForeignKey(EngagementType, on_delete=models.CASCADE) external_party = models.ForeignKey(Organisation, on_delete=models.CASCADE) - officers = models.ManyToManyField(TeamUser) + officers = models.ManyToManyField("myuser.TeamUser") objects = EngagementManager() @@ -189,6 +187,9 @@ class Engagement(Common): dscs.add(si) return dscs + def alt_str(self): + return f"{self.engagement_type.name} at {self.external_party}" + def __str__(self): return f"{self.engagement_type.name} at {self.external_party} ({self.proposed_start_date})" -- cgit v1.2.3