I'm creating a simple binary rating system for my website, it is a study materials website with summaries that can be rated +1 or -1.
I've defined to ManyToMany fields between my Summary model and User model like so:
users_rated_positive = models.ManyToManyField(
User, blank=True, related_name='summaries_rated_positive')
users_rated_negative = models.ManyToManyField(
User, blank=True, related_name='summaries_rated_negative')
However it is obvious that a given user can not rate a given summary more than once.
I tried setting unique=True but Django doesn't seem to let me do that.
Is there are more optimal way to store the ratings that aligns better with my intentions?