Esempio n. 1
0
 def rating_issued(self, bounty_id, review, uid, reviewer, reviewee,
                   **kwargs):
     bounty = Bounty.objects.get(id=bounty_id)
     string_data = notification_templates['RatingIssued'].format(
         bounty_title=bounty.title)
     notification_name = notifications['RatingIssued']
     create_rating_notification(bounty=bounty,
                                uid='{}-{}-{}'.format(
                                    uid, reviewer.id, notification_name),
                                notification_name=notification_name,
                                user=reviewer,
                                from_user=reviewee,
                                string_data=string_data,
                                notification_created=review.created,
                                subject='You Wrote a Review',
                                review=review)
Esempio n. 2
0
 def rating_received(self, bounty_id, review, uid, reviewer, reviewee,
                     **kwargs):
     bounty = Bounty.objects.get(id=bounty_id)
     string_data = notification_templates['RatingReceived'].format(
         bounty_title=bounty.title)
     notification_name = notifications['RatingReceived']
     create_rating_notification(bounty=bounty,
                                uid='{}-{}-{}'.format(
                                    uid, reviewee.id, notification_name),
                                notification_name=notification_name,
                                user=reviewee,
                                from_user=reviewer,
                                string_data=string_data,
                                notification_created=review.created,
                                review=review,
                                subject='You Received a Review',
                                is_activity=False)