4
4
from rest_framework .views import APIView
5
5
from rest_framework .response import Response
6
6
from rest_framework .permissions import IsAuthenticated
7
+ from rest_framework_simplejwt .authentication import JWTAuthentication
7
8
8
9
from django .conf import settings
9
10
from django .db .models import Count
10
11
from django .http import Http404
11
12
12
- from core .authentication import TokenAuthentication
13
13
from events .models import (
14
14
CustomEvent , Location , ProposedTalkEvent ,
15
15
ProposedTutorialEvent , SponsoredEvent , Time , KeynoteEvent
@@ -34,7 +34,7 @@ class TutorialListAPIView(ListAPIView):
34
34
35
35
36
36
class SpeechListAPIView (APIView ):
37
- authentication_classes = [TokenAuthentication ]
37
+ authentication_classes = [JWTAuthentication ]
38
38
permission_classes = [IsAuthenticated ]
39
39
40
40
def get (self , request , * args , ** kwargs ):
@@ -76,7 +76,7 @@ class TutorialDetailAPIView(RetrieveAPIView):
76
76
77
77
78
78
class SpeechDetailAPIView (APIView ):
79
- authentication_classes = [TokenAuthentication ]
79
+ authentication_classes = [JWTAuthentication ]
80
80
permission_classes = [IsAuthenticated ]
81
81
82
82
def get (self , request , * args , ** kwargs ):
@@ -213,7 +213,7 @@ def display(self):
213
213
214
214
215
215
class ScheduleAPIView (APIView ):
216
- authentication_classes = [TokenAuthentication ]
216
+ authentication_classes = [JWTAuthentication ]
217
217
permission_classes = [IsAuthenticated ]
218
218
219
219
event_querysets = [
@@ -294,7 +294,7 @@ def get(self, request):
294
294
295
295
296
296
class KeynoteEventListAPIView (ListAPIView ):
297
- authentication_classes = [TokenAuthentication ]
297
+ authentication_classes = [JWTAuthentication ]
298
298
permission_classes = [IsAuthenticated ]
299
299
300
300
queryset = KeynoteEvent .objects .all ()
0 commit comments