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