diff --git a/api/v1/views.py b/api/v1/views.py index 04e2beb5..e93075c4 100644 --- a/api/v1/views.py +++ b/api/v1/views.py @@ -1,7 +1,7 @@ from django.contrib.auth import get_user_model from rest_framework import status, views, viewsets, generics -from rest_framework.decorators import detail_route, list_route, action, permission_classes +from rest_framework.decorators import detail_route, list_route, action, permission_classes, authentication_classes from rest_framework.response import Response from . import ExtendedModelViewSet @@ -514,6 +514,7 @@ class ObjectCommentsViewSet(ExtendedModelViewSet): print(e) instance.delete() + @authentication_classes([]) def list(self, request, *args, **kwargs): queryset = self.filter_queryset(self.get_queryset()).filter(parent__isnull=True) serializer = self.get_serializer(queryset, many=True) diff --git a/apps/content/templates/content/blocks/video.html b/apps/content/templates/content/blocks/video.html index 791920b1..8c707388 100644 --- a/apps/content/templates/content/blocks/video.html +++ b/apps/content/templates/content/blocks/video.html @@ -15,29 +15,3 @@ - - diff --git a/apps/course/templates/course/course.html b/apps/course/templates/course/course.html index c3a35c4f..e031fe23 100644 --- a/apps/course/templates/course/course.html +++ b/apps/course/templates/course/course.html @@ -70,7 +70,7 @@
{{ course.title }}
-
{{ course.short_description | linebreaks }}
+
{{ course.short_description | safe | linebreaks }}
{% if course.author.photo %} @@ -270,7 +270,7 @@
{{ course.title }}
-
{{ course.short_description | linebreaks }}
+
{{ course.short_description | safe | linebreaks }}
{% if course.author.photo %} @@ -340,38 +340,7 @@
Задавайте вопросы:
-
- {% if request.user.is_authenticated %} -
- -
- -
-
-
- {% else %} -
Только зарегистрированные пользователи могут оставлять комментарии.
- {% endif %} -
- {% include "templates/blocks/comments.html" with object=course %} -
-
+
diff --git a/apps/course/templates/course/course_only_lessons.html b/apps/course/templates/course/course_only_lessons.html index 9efe873c..f68414b4 100644 --- a/apps/course/templates/course/course_only_lessons.html +++ b/apps/course/templates/course/course_only_lessons.html @@ -68,7 +68,7 @@
{{ course.title }}
-
{{ course.short_description }}
+
{{ course.short_description | safe | linebreaks }}
{% if course.author.photo %} @@ -204,31 +204,7 @@
Задавайте вопросы:
-
- {% if user.is_authenticated %} -
- -
- -
-
-
- {% else %} -
Только зарегистрированные пользователи могут оставлять комментарии.
- {% endif %} -
- {% include "templates/blocks/comments.html" with object=course %} -
-
+
diff --git a/apps/course/templates/course/lesson.html b/apps/course/templates/course/lesson.html index d36219f7..990f4e35 100644 --- a/apps/course/templates/course/lesson.html +++ b/apps/course/templates/course/lesson.html @@ -117,9 +117,7 @@
Задавайте вопросы:
-
- -
+
diff --git a/web/src/components/Comments.vue b/web/src/components/Comments.vue index ad7e88d1..2fd5bbb4 100644 --- a/web/src/components/Comments.vue +++ b/web/src/components/Comments.vue @@ -1,5 +1,5 @@