I've customized the django user object as follows,
class User(AbstractBaseUser):
mobile = models.CharField(max_length=100, unique=True)
email = models.EmailField(max_length=255)
username = models.CharField(max_length=255)
full_name = models.CharField(max_length=255, blank=True, null=True)
staff = models.BooleanField(default=False)
admin = models.BooleanField(default=False)
root = models.BooleanField(default=False)
I also have a feed and a Source object, which has a one-to-many relationship.
class Source(Base):
name = models.CharField(max_length=255)
class Feed(Base):
headline = models.CharField(max_length=255)
link = models.CharField(max_length=255)
summary = models.TextField()
published_date = models.DateTimeField()
views = models.IntegerField(default=0)
shares = models.IntegerField(default=0)
source = models.ForeignKey(Source, on_delete=models.CASCADE,)
Now I want to simulate a bookmarking action and thus associate many feeds with one user. How do I do that in Django.