Issue
I'm new in DRF and now I have an Error in logout in DRF API browsable
when I want to logout in API browsable it shows me Error 405 (method not Allowed)
this is my setting.py:
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
),
}
this is my urls.py:
urlpatterns = [
path('admin/', admin.site.urls),
path('api-auth/', include('rest_framework.urls'))
]
please tell what can I do to fix this Error
as I said I'm new in DRF so I just Wrote this codes nothing else
I think this Error its because BasicAuthentication
Solution
It depends on Django version you are using. If you are using Version 5, try downgrading to 4.2.7.
Answered By - DonPA
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.