2016-03-16 66 views
0

我已经设置了Django的allauth和使用电子邮件确认时,新用户注册,工作正常Django的allauth:电子邮件确认

,但在确认电子邮件,我得到

Hello from example.com! 

    You're receiving this e-mail because user abc13 at example.com has given yours as an e-mail address to connect their account. 

    To confirm this is correct, go to http://<mysite>.com/accounts/confirm-email/q3rknxpflshgwddlbjw6aqzlr1ayqtnfrtezucoq2ysmfbm2etcldusq5dyrcoap/ 

    Thank you from example.com! 
    example.com 

我怎么能将“example.com”替换为我的网站名称?

感谢

回答

2

这听起来像你需要更新Django管理的Site条目。您可以访问此:

http://<yoursite>.com/admin/sites/site/ 
+0

感谢你,成功了! – ealeon

1

您也可以创建一个完全自定义的电子邮件的东西,如:

@receiver(user_signed_up) 
def user_signed_up_(sender,request,user,**kwargs): 

    subject, from_email, to = 'Welcome', '[email protected]', '[email protected]' 
    text_content ="some custom text or html" 
    msg = EmailMultiAlternatives(subject, text_content, from_email, [to]) 
    msg.attach_alternative(html_content, "text/html") 
    msg.send() 
+0

这个函数在哪里去? – ealeon

+0

app/models.py工程 – charlie6411

+0

如果你这样做,你将需要在settings.py下禁用默认电子邮件 – charlie6411