擅长:python、mysql、java
<p>尽管nishant和Amit解决方案有效,但这也应该有效</p>
<pre><code>def get(self, request, *args, **kwargs):
kwargs=self.kwargs
key=kwargs.get('key')
</code></pre>
<p>但是,在这种情况下,Allauth实际上会使用以下表单的url进行投诉:</p>
<pre><code>path('rest-auth/registration/account-confirm-email/<str:key>', VerifyEmailView.as_view(), name='account_confirm_email'),
</code></pre>
<p>有这样的错误:
异常值:</p>
<p>TemplateResponseMixin需要“template\u name”的定义或“get\u template\u names()”的实现</p>
<p>并需要表单的url:</p>
<pre><code>path('rest-auth/registration/account-confirm-email/', VerifyEmailView.as_view(), name='account_confirm_email'),
</code></pre>
<p>有了这个#nishant解决方案</p>