我目前正在使用django-rest-passwordreset包,但是当我转到reset-password端点时,DRF browsable API不起作用(package文档提到支持browsable API是可用的)。
urlpatterns = [
path('password-reset/', include('django_rest_passwordreset.urls', namespace='password_reset')),
]是否有需要更改的设置?
发布于 2019-03-06 00:01:55
从setting.py中删除所有默认身份验证和权限类,然后尝试
发布于 2019-03-06 01:05:21
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
)}
粗暴地将此添加到您的设置中,py删除此BasicAuthentication,SessionAuthentication。如果仍然无法使用可浏览的图像进行开机自检
https://stackoverflow.com/questions/55004386
复制相似问题