当我使用pytest运行测试用例时,我收到了10条警告-
RemovedInDjango40Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().
url(r'^password/reset/$', PasswordResetView.as_view(),
RemovedInDjango40Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().
url(r'^password/reset/confirm/$', PasswordResetConfirmView.as_view(),
RemovedInDjango40Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().
url(r'^login/$', LoginView.as_view(), name='rest_login'),
有10个这样的警告。我已经在setup.cfg中尝试过filterwarnings。错误的来源是:C:\Users\suraj\AppData\Local\Programs\Python\Python39\lib\site-packages\dj_rest_auth\registration\urls
已编辑-此警告已解决,但现在我将错误发送到dj-rest-auth ImproperlyConfigured at /api/v1/auth/registration/account-email-verification-sent/
1条答案
按热度按时间xnifntxz1#
在检查源代码时,我可以看到较新版本的dj_rest_auth不再使用url,而是使用path。
因此,将dj_rest_auth更新为较新版本将修复此问题。请参阅release页面以获取可供选择的版本。