Skip to content

Commit f610a05

Browse files
committed
Feat: drop coreapi support from authtoken
1 parent 1e6e4e9 commit f610a05

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

rest_framework/authtoken/views.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
from rest_framework import parsers, renderers
22
from rest_framework.authtoken.models import Token
33
from rest_framework.authtoken.serializers import AuthTokenSerializer
4-
from rest_framework.compat import coreapi, coreschema
54
from rest_framework.response import Response
6-
from rest_framework.schemas import ManualSchema
7-
from rest_framework.schemas import coreapi as coreapi_schema
85
from rest_framework.views import APIView
96

107

@@ -15,31 +12,6 @@ class ObtainAuthToken(APIView):
1512
renderer_classes = (renderers.JSONRenderer,)
1613
serializer_class = AuthTokenSerializer
1714

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-
4315
def get_serializer_context(self):
4416
return {
4517
'request': self.request,

0 commit comments

Comments
 (0)