-
Notifications
You must be signed in to change notification settings - Fork 13
/
config.py
54 lines (39 loc) · 1.85 KB
/
config.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
53
54
#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = ['"wuyadong" <[email protected]>']
debug = True
#-----------------------------静态文件和模板文件----------------------------------
import os
# static path
static_path = os.path.join(os.path.dirname(__file__), "static")
# template path
template_path = os.path.join(os.path.dirname(__file__), "templates")
#---------------------------------图片bucket------------------------------------
# 图片存储的bucket name
IMAGE_BUCKET = "dailyimage"
#---------------------------------日报数据存储------------------------------------
from base.daily_store import DailyStorer
# sae数据库存储(sae数据库需要租金,不建议使用)
# import sae.const
# DailyStorer.configure("base.db_store.DatabaseStorer",
# host=sae.const.MYSQL_HOST,
# port=int(sae.const.MYSQL_PORT),
# user=sae.const.MYSQL_USER,
# passwd=sae.const.MYSQL_PASS,
# db=sae.const.MYSQL_DB)
# sae kvdb数据库存储
DailyStorer.configure("base.kvdb_store.KvdbStorer")
#----------------------------------运维管理员-------------------------------------
# admin 帐号密码
username = "admin"
password = "admin"
#---------------------------------全文搜索---------------------------------------
from search.fts_search import FTSSearcher
# ali fts searcher
# FTSSearcher.configure("search.ali_search.AliFTSSearcher",
# uri="http://opensearch-cn-hangzhou.aliyuncs.com",
# app="zhihudaily", access_key="fake_key",
# access_secret="fake_secret")
# sae kvdb fts searcher (由于sae的kvdb有分钟配额限制,数据量稍大就会被禁止,不建议使用)
FTSSearcher.configure("search.kvdb_search.KvdbFTSSearcher",
name="zhihudaily")