File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change 1
1
from rest_framework import parsers , renderers
2
2
from rest_framework .authtoken .models import Token
3
3
from rest_framework .authtoken .serializers import AuthTokenSerializer
4
- from rest_framework .compat import coreapi , coreschema
5
4
from rest_framework .response import Response
6
- from rest_framework .schemas import ManualSchema
7
- from rest_framework .schemas import coreapi as coreapi_schema
8
5
from rest_framework .views import APIView
9
6
10
7
@@ -15,31 +12,6 @@ class ObtainAuthToken(APIView):
15
12
renderer_classes = (renderers .JSONRenderer ,)
16
13
serializer_class = AuthTokenSerializer
17
14
18
- if coreapi_schema .is_enabled ():
19
- schema = ManualSchema (
20
- fields = [
21
- coreapi .Field (
22
- name = "username" ,
23
- required = True ,
24
- location = 'form' ,
25
- schema = coreschema .String (
26
- title = "Username" ,
27
- description = "Valid username for authentication" ,
28
- ),
29
- ),
30
- coreapi .Field (
31
- name = "password" ,
32
- required = True ,
33
- location = 'form' ,
34
- schema = coreschema .String (
35
- title = "Password" ,
36
- description = "Valid password for authentication" ,
37
- ),
38
- ),
39
- ],
40
- encoding = "application/json" ,
41
- )
42
-
43
15
def get_serializer_context (self ):
44
16
return {
45
17
'request' : self .request ,
You can’t perform that action at this time.
0 commit comments