new name @property in List model, replete w. proper testing in tests.test_models

This commit is contained in:
Disco DeDisco
2026-02-08 22:50:03 -05:00
parent 94a161fe09
commit 4e1feddb45
2 changed files with 10 additions and 0 deletions

View File

@@ -10,6 +10,10 @@ class List(models.Model):
on_delete=models.CASCADE,
)
@property
def name(self):
return self.item_set.first().text
def get_absolute_url(self):
return reverse("view_list", args=[self.id])