Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Commit d12df9a

Browse files
committed
Merge pull request #11 from halfcrazy/add-wechatpy
add wechat client
2 parents 772d431 + 95cf6a0 commit d12df9a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

spirit/app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import tornado.web
33
import pymongo
4+
from wechatpy import WeChatClient
45

56
from .routers import routers
67

@@ -16,6 +17,9 @@ def __init__(self, config):
1617
xsrf_cookies=config.xsrf_cookies,
1718
)
1819

20+
self.wechat_client = WeChatClient(config.wechat_appid,
21+
config.wechat_secret)
22+
1923
self.db = getattr(
2024
pymongo.MongoClient(config.mongodb_host, config.mongodb_port),
2125
config.db_name)

spirit/config/_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ def __init__(self):
2525
self.mongodb_host = '127.0.0.1'
2626
self.mongodb_port = 27017
2727
self.db_name = 'spirit'
28+
self.wechat_appid = ''
29+
self.wechat_secret = ''

0 commit comments

Comments
 (0)