Fix admin login 500 when clients omit the trailing slash.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
from rest_framework import viewsets, status
|
||||
from rest_framework.decorators import action, api_view, permission_classes
|
||||
from rest_framework.decorators import (
|
||||
action,
|
||||
api_view,
|
||||
authentication_classes,
|
||||
permission_classes,
|
||||
)
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.permissions import AllowAny, IsAuthenticated, IsAdminUser
|
||||
from rest_framework.parsers import MultiPartParser, FormParser, JSONParser
|
||||
@@ -17,6 +22,7 @@ from .serializers import (
|
||||
|
||||
|
||||
@api_view(['POST'])
|
||||
@authentication_classes([])
|
||||
@permission_classes([AllowAny])
|
||||
def admin_login(request):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user