mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-06-30 02:13:29 +03:00
Revert redundant change
This commit is contained in:
parent
63ce5c9414
commit
f7e8556eec
|
@ -8,7 +8,6 @@ methods on viewsets that should be included by routers.
|
||||||
"""
|
"""
|
||||||
import types
|
import types
|
||||||
|
|
||||||
from django import VERSION as DJANGO_VERSION
|
|
||||||
from django.forms.utils import pretty_name
|
from django.forms.utils import pretty_name
|
||||||
|
|
||||||
from rest_framework.views import APIView
|
from rest_framework.views import APIView
|
||||||
|
@ -74,11 +73,6 @@ def api_view(http_method_names=None):
|
||||||
WrappedAPIView.schema = getattr(func, 'schema',
|
WrappedAPIView.schema = getattr(func, 'schema',
|
||||||
APIView.schema)
|
APIView.schema)
|
||||||
|
|
||||||
# Exempt all DRF views from Django's LoginRequiredMiddleware. Users should set
|
|
||||||
# DEFAULT_PERMISSION_CLASSES to 'rest_framework.permissions.IsAuthenticated' instead
|
|
||||||
if DJANGO_VERSION >= (5, 1):
|
|
||||||
func.login_required = False
|
|
||||||
|
|
||||||
return WrappedAPIView.as_view()
|
return WrappedAPIView.as_view()
|
||||||
|
|
||||||
return decorator
|
return decorator
|
||||||
|
|
Loading…
Reference in New Issue
Block a user