简体   繁体   English

Django DRF:如何使用 djoser 启用重置密码的激活码

[英]Django DRF: How to enable activation code for reset password using djoser

I have been successfully able to setup a Django app with Djoser token based authentication.我已经成功地使用基于 Djoser 令牌的身份验证设置了 Django 应用程序。 I want to generate a activation code / url and make the user activate through that code / link for account activation or reset password.我想生成一个激活码/网址,并让用户通过该代码/链接激活帐户激活或重置密码。

The Base Endpoints explains how to enable and utilize the activation using the endpoints. 基本端点解释了如何使用端点启用和利用激活。 But how do I get to create the db models and generate activation code for the users?但是如何创建数据库模型并为用户生成激活码? Am I missing something ?我错过了什么吗?

Activation code is generated by djoser.email.ActivationEmail view激活码由djoser.email.ActivationEmail视图生成

You only concern should be to run database migrations您唯一关心的应该是运行数据库迁移

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM