Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/website/webview/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from shared.models import NixpkgsIssue
from shared.models import NixChannel
from shared.models.nix_evaluation import NixDerivation


class Profile(models.Model):
Expand All @@ -15,7 +16,8 @@ class Profile(models.Model):
"""

user = models.OneToOneField(User, on_delete=models.CASCADE)
subscriptions = models.ManyToManyField(NixpkgsIssue, related_name="subscribers")
channels = models.ManyToManyField(NixChannel, related_name="subscribers")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@balsoft suggested to actually have something like "collections" or "profiles" (see #532 (comment)), which I think is a good idea if we eventually want users to be able to subscribe programmatically from clients on different machines/setups. Therefore how about we put this into a container?

packages = models.ManyToManyField(NixDerivation, related_name="subscribers")


@receiver(post_save, sender=User)
Expand Down