From f1a6760af77da3b296077e32518a549374965cf1 Mon Sep 17 00:00:00 2001 From: Taizo 'Tsa6' Simpson Date: Sat, 26 Aug 2017 02:29:42 -0400 Subject: [PATCH] Added more info to the DiscussionVote table --- LandingPage/models.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/LandingPage/models.py b/LandingPage/models.py index 7c906b4..c373478 100644 --- a/LandingPage/models.py +++ b/LandingPage/models.py @@ -351,11 +351,15 @@ class DiscussionReply(models.Model): class DiscussionVote(models.Model): user = models.ForeignKey( User, - on_delete=models.CASCADE + on_delete=models.CASCADE, + related_name='discussion_votes', + help_text='The user which cast this vote' ) board = models.ForeignKey( DiscussionBoard, - on_delete=models.CASCADE + on_delete=models.CASCADE, + related_name='votes', + help_text='The board this vote was cast on' ) postive = models.BooleanField( help_text='If true, the vote is an upvote. Otherwise, it is a downvote. Neutral votes are not recorded'