def get_context_data(self, **kwargs):
    data = super(ContestProblemDetail, self).get_context_data(**kwargs)
    data['contest_problem'] = get_object_or_404(ContestProblem,
                                                identifier=self.kwargs.get('pid'),
                                                contest=self.contest)
    data['problem'] = data['contest_problem'].problem

    # submit part
    data['lang_choices'] = list(filter(lambda k: k[0] in self.contest.supported_language_list, LANG_CHOICE))
    # if self.request.user.is_authenticated:
    #     data['attempt_left'] = settings.SUBMISSION_ATTEMPT_LIMIT - self.contest.submission_set.filter(
    #         author=self.request.user,
    #         problem_id=data['contest_problem'].problem_id).count()
    #     if self.contest.status != 0:
    #         data['attempt_left'] = settings.SUBMISSION_ATTEMPT_LIMIT
    return data