summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--teams/models.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/teams/models.py b/teams/models.py
index b0f6fe4..ed91f73 100644
--- a/teams/models.py
+++ b/teams/models.py
@@ -4,6 +4,9 @@ from django.contrib.auth.models import User
from workshop_app.models import Profile
class Team(models.Model):
- members = models.ManyToManyField(Profile)
- creator = models.OneToOneField(User, on_delete=models.CASCADE)
- created_date = models.DateTimeField(auto_now=True) \ No newline at end of file
+ members = models.ManyToManyField(Profile)
+ creator = models.OneToOneField(User, on_delete=models.CASCADE)
+ created_date = models.DateTimeField(auto_now=True)
+
+ def __str__(self):
+ return f"Team created by {self.creator.get_full_name()}"