List objects now container owner values, saved upon creation, linked to user fk; apps.dashboard.views updated accordingly; 36 UTs passing (2 new)
This commit is contained in:
@@ -2,6 +2,14 @@ from django.db import models
|
||||
from django.urls import reverse
|
||||
|
||||
class List(models.Model):
|
||||
owner = models.ForeignKey(
|
||||
"lyric.User",
|
||||
related_name="lists",
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=models.CASCADE,
|
||||
)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("view_list", args=[self.id])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user