Associate each bookmark with a user
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user