From 20c3130c141f1325aedface3de619294be7ac1a9 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Thu, 7 Sep 2023 00:42:24 +0300 Subject: [PATCH] Add `Project.name_with_owner` property --- docker-app/qfieldcloud/core/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-app/qfieldcloud/core/models.py b/docker-app/qfieldcloud/core/models.py index 415e41a60..50bed26ab 100644 --- a/docker-app/qfieldcloud/core/models.py +++ b/docker-app/qfieldcloud/core/models.py @@ -1078,6 +1078,10 @@ def get_absolute_url(self): def __str__(self): return self.name + " (" + str(self.id) + ")" + " owner: " + self.owner.username + @property + def name_with_owner(self) -> str: + return f"{self.owner.username}/{self.name}" + @property def attachment_dirs(self) -> List[str]: """Returns a list of configured attachment dirs for the project.