Example #1
0
def unstar_comment(request, comment_id):
    comment = get_object_or_404(QuestComment, id=comment_id)

    models.unstar(request.user, comment)
    Metrics.unstar.record(request, comment=comment.id)

    comment_details = comment.details()

    return {'comment': comment.details()}
Example #2
0
def unstar_comment(request, comment_id):
    comment = get_object_or_404(QuestComment, id=comment_id)

    models.unstar(request.user, comment)
    Metrics.unstar.record(request, comment=comment.id)

    comment_details = comment.details()

    return {'comment': comment.details()}
Example #3
0
def unstar_comment(request, comment_id):
    comment = get_object_or_404(QuestComment, id=comment_id)

    models.unstar(request.user, comment)
    Metrics.unstar.record(request, comment=comment.id)

    comment_details = comment.details()
    add_viewer_has_starred_field([comment_details], viewer=request.user)

    return {'comment': comment_details}
Example #4
0
def unstar_comment(request, comment_id):
    comment = get_object_or_404(QuestComment, id=comment_id)

    models.unstar(request.user, comment)
    Metrics.unstar.record(request, comment=comment.id)

    comment_details = comment.details()
    add_viewer_has_starred_field([comment_details], viewer=request.user)

    return {'comment': comment_details}
Example #5
0
 def unstar(self, user):
     from drawquest.apps.stars.models import unstar
     return unstar(user, self)
Example #6
0
 def unstar(self, user):
     from drawquest.apps.stars.models import unstar
     return unstar(user, self)
Example #7
0
 def _unstar(self, api=False):
     if api:
         self.api_post('/api/stars/unstar', {'comment_id': self.comment.id},
                       user=self.user)
     else:
         models.unstar(self.user, self.comment)
Example #8
0
 def _unstar(self, api=False):
     if api:
         self.api_post('/api/stars/unstar', {'comment_id': self.comment.id}, user=self.user)
     else:
         models.unstar(self.user, self.comment)