From b12e0ef56ee9fd0a60040a634e64419690d952d4 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 4 Mar 2018 15:50:57 +0300 Subject: [PATCH] last_active --- access/views.py | 3 ++- progress/views.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/access/views.py b/access/views.py index 0f908c5..5915943 100644 --- a/access/views.py +++ b/access/views.py @@ -293,7 +293,8 @@ class MinUserView(APIView): class ManagementPassword(generics.GenericAPIView): permission_classes = (permissions.IsAuthenticated, permissions.IsAdminUser) - def post(self, request): + @staticmethod + def post(request): """ Set password to the student in admin area by manager --- diff --git a/progress/views.py b/progress/views.py index 0aa0ca3..2b43719 100644 --- a/progress/views.py +++ b/progress/views.py @@ -5,6 +5,7 @@ from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.core.mail import EmailMessage from django.http import HttpResponse, HttpResponseForbidden +from rest_framework import permissions from rest_framework.permissions import IsAuthenticated from rest_framework.renderers import JSONRenderer from rest_framework.response import Response @@ -168,6 +169,7 @@ class TeacherUpdateProgress(APIView): class StudentUpdateProgress(APIView): + permission_classes = (permissions.IsAuthenticated,) renderer_classes = (JSONRenderer,) @staticmethod