Ejemplo n.º 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()}
Ejemplo n.º 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()}
Ejemplo n.º 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}
Ejemplo n.º 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}
Ejemplo n.º 5
0
 def unstar(self, user):
     from drawquest.apps.stars.models import unstar
     return unstar(user, self)
Ejemplo n.º 6
0
 def unstar(self, user):
     from drawquest.apps.stars.models import unstar
     return unstar(user, self)
Ejemplo n.º 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)
Ejemplo n.º 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)