-
Notifications
You must be signed in to change notification settings - Fork 8
/
local_settings.py
52 lines (46 loc) · 1.14 KB
/
local_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python
# *_* encoding=utf-8*_*
import os
_debug=False
BLOG_NAME = 'LogPress'
BLOG_SUB_NAME = 'a blog engine powerby django running on SAE'
BLOG_SITE_KEYWORDS='blog,sae,django,python,logpress'
BLOG_SITE_DESCRIPTION=''
#博客域名
if 'APP_NAME' in os.environ:
BLOG_DOMAIN="http://%s"%os.environ['APP_NAME']
else:
_debug=True
BLOG_DOMAIN="http://127.0.0.1:8080"
#sae 文件存储的domain
STORAGE_DOMAIN='attachment'
#email
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'xxxxx'
EMAIL_PORT = 587
if _debug:
DATABASES = {
'default': {
'ENGINE': 'mysql',
'NAME': 'blog',
'USER': 'root',
'PASSWORD': 'root',
'HOST': '0.0.0.0',
'PORT': '3306',
}
}
else:
import sae.core
app = sae.core.Application()
DATABASES = {
'default': {
'ENGINE': 'mysql',
'NAME': app.mysql_db,
'USER': app.mysql_user,
'PASSWORD': app.mysql_pass,
'HOST': app.mysql_host,
'PORT': app.mysql_port,
}
}