Associate each bookmark with a user

This commit is contained in:
2021-03-11 08:56:47 -06:00
parent c9d0d81972
commit d80d70b1fe
2 changed files with 24 additions and 0 deletions

View File

@@ -1,8 +1,10 @@
from django.db import models
from django.contrib.auth.models import User
class Bookmark(models.Model):
title = models.CharField(max_length=255,null=True)
url = models.URLField(max_length=2048)
user = models.ForeignKey(User, on_delete=models.CASCADE)
def __str__(self):
return self.title