# coding=utf-8 from django.http import Http404 from lms.decors import response_decor from management.models import Comment @response_decor(template='comment_one.html', without_auth=False) def comment_view(request, view_id): # Страница вопроса форума try: comment = Comment.objects.get(token=view_id) except Comment.DoesNotExist: raise Http404 else: if comment.status in ['S', 'Q'] or request.user.is_admin: comment = comment.get_face() else: raise Http404 return {'comment': comment} @response_decor(template='forum.html', without_auth=False) def index(request): raise Http404 return {}