Notice
Recent Posts
Recent Comments
Link
목록page (1)
WinGyu_coder
Django, DRF djangorestframework, 로그인 상태 확인하는 방법 handle_exceoption
from rest_framework.views import APIView from rest_framework.exceptions import NotAuthenticated from rest_framework.permissions import IsAuthenticated from django.shortcuts import redirect class PageAPIView(APIView): permission_classes = [IsAuthenticated] def handle_exception(self, exc): if isinstance(exc, NotAuthenticated): return redirect('login_url') return super().handle_exception(exc) 아주 간편..
Django 백엔드의 모든것
2024. 4. 12. 10:58