DRF可浏览的API无法在“django-rest-passwordreset”包中使用

问题描述 投票:1回答:2

我目前正在使用django-rest-passwordreset软件包,但是当我去重置密码端点DRF浏览器API无效时(软件包文档提到可浏览的API支持可用)。

urlpatterns = [
    path('password-reset/', include('django_rest_passwordreset.urls', namespace='password_reset')),
]

有什么设置我必须改变吗?

django api browsable
2个回答
0
投票

从setting.py中删除所有默认的身份验证和权限类,然后尝试


0
投票
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
    'rest_framework.authentication.BasicAuthentication',
    'rest_framework.authentication.SessionAuthentication',
)

}

你把它添加到你的设置,py删除这个BasicAuthentication,SessionAuthentication。如果仍然没有使用浏览图像发布问题

© www.soinside.com 2019 - 2024. All rights reserved.