[Tasks] fix celery startup
[mygpo.git] / mygpo / suggestions / models.py
blob73524cc46f491d912ca15a41e6d95a3b1568924d
1 from django.db import models
2 from django.conf import settings
4 from mygpo.core.models import UpdateInfoModel, DeleteableModel
5 from mygpo.podcasts.models import Podcast
8 class PodcastSuggestion(UpdateInfoModel, DeleteableModel):
9 """ A podcast which is suggested to a user
11 A suggestion can be marked as "unwanted" by a user by deleting it. """
13 # the user to which the podcast has been suggested
14 suggested_to = models.ForeignKey(settings.AUTH_USER_MODEL,
15 on_delete=models.CASCADE)
17 # the podcast which has been suggested to the above user
18 podcast = models.ForeignKey(Podcast, on_delete=models.PROTECT)
20 class Meta:
21 unique_together = [
22 ('suggested_to', 'podcast'),