Skip to content

Commit

Permalink
add SITEUSER_EMAIL in README and local_settings.py.example
Browse files Browse the repository at this point in the history
  • Loading branch information
yueyoum committed Jul 1, 2013
1 parent 2945cc2 commit 98ff5e8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -89,6 +89,7 @@ pip install django-siteuser
```

* 将此model的定义写在其他文件中,然后在settings.py中指定。


`example`使用的第二种,具体可以查看`example`项目.

Expand Down Expand Up @@ -124,6 +125,19 @@ pip install django-siteuser
`example`使用的第二种,具体可以查看`example`项目.


* `SITEUSER_EMAIL`

siteuser自己写了发邮件的方法,所以也没使用Django自己的EMAI设置
所以你需要设置`SITEUSER_EMAIL`, 见 ![local_settings.py.example](/example/example/local_settings.py.example)

其中需要说明的是 `display_from` 这个设置,
如果你没有自己架设SMTP SERVER,也没有购买发送邮件的服务,
而是直接在gmail, 163, sohu等email提供商那儿免费申请了个邮箱,
那么你的邮箱肯定是 name@gmail.com这种形式的。
这时候如果你想在别人的收件箱里显示 `abc@def.com`
那么就把 `display_from` 设置成此值。如果不设置,那么默认就是`from`


#### 模板

你需要自己完成 login.html, register.html, account_settings.html 模板。(名字可以自己取,只要在代码中
Expand Down
9 changes: 9 additions & 0 deletions example/example/local_settings.py.example
@@ -1,5 +1,14 @@
# -*- coding: utf-8 -*-

SITEUSER_EMAIL = {
'smtp_host': 'smtp.gmail.com',
'smtp_port': 25,
'username': 'xxx',
'password': 'xxx',
'from': 'xxx@gmail.com',
'display_from': '',
}

SOCIALOAUTH_SITES = (
('renren', 'socialoauth.sites.renren.RenRen', '人人',
{
Expand Down

0 comments on commit 98ff5e8

Please sign in to comment.