Пример #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()}
Пример #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()}
Пример #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}
Пример #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}
Пример #5
0
 def unstar(self, user):
     from drawquest.apps.stars.models import unstar
     return unstar(user, self)
Пример #6
0
 def unstar(self, user):
     from drawquest.apps.stars.models import unstar
     return unstar(user, self)
Пример #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)
Пример #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)