added sharing to recipe books

This commit is contained in:
vabene1111
2020-05-02 14:15:56 +02:00
parent 64ee18c4d8
commit 349b9629f8
4 changed files with 25 additions and 4 deletions

View File

@ -197,6 +197,7 @@ class RecipeBook(models.Model):
name = models.CharField(max_length=128)
description = models.TextField(blank=True)
icon = models.CharField(max_length=16, blank=True, null=True)
shared = models.ManyToManyField(User, blank=True, related_name='shared_with')
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
def __str__(self):