如何在开发服务器上测试django注册应用程序进程(无邮件)

栏目: Python · 发布时间: 6年前

内容简介:翻译自:https://stackoverflow.com/questions/3731821/how-to-test-django-registration-app-process-while-in-development-server-no-mail
我正在我的MAC上开发一个django应用程序. django

附带的开发服务器很棒.但是,我安装了django-authopenid(将django-registration app与openID相结合),遵循3步流程:用户注册,app发送带链接的确认电子邮件,用户点击链接确认注册.

由于django开发服务器没有邮件服务器,如何测试该进程的此确认电子邮件部分?我按照一个想法将电子邮件的内容打印到终端,但我不能按照链接.有什么建议?

Python

有一个调试邮件服务器可用于此目的.

只需执行此命令,您就可以在端口1025上运行邮件服务器

python -m smtpd -n -c DebuggingServer localhost:1025

之后你需要在Django中更改你的MAIL_HOST设置,你可以在本地测试你的电子邮件:)

翻译自:https://stackoverflow.com/questions/3731821/how-to-test-django-registration-app-process-while-in-development-server-no-mail


以上所述就是小编给大家介绍的《如何在开发服务器上测试django注册应用程序进程(无邮件)》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Distributed Algorithms

Distributed Algorithms

Wan Fokkink / The MIT Press / 2013-12-6 / USD 40.00

This book offers students and researchers a guide to distributed algorithms that emphasizes examples and exercises rather than the intricacies of mathematical models. It avoids mathematical argumentat......一起来看看 《Distributed Algorithms》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具