コード例 #1
0
ファイル: api.py プロジェクト: eiritana/canvas
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
ファイル: api.py プロジェクト: StetHD/canvas-2
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
ファイル: models.py プロジェクト: eiritana/canvas
 def unstar(self, user):
     from drawquest.apps.stars.models import unstar
     return unstar(user, self)
コード例 #6
0
ファイル: models.py プロジェクト: StetHD/canvas-2
 def unstar(self, user):
     from drawquest.apps.stars.models import unstar
     return unstar(user, self)
コード例 #7
0
ファイル: tests.py プロジェクト: eiritana/canvas
 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)