|
# -*- coding: utf-8 -*-
from django.conf import settings
from pywe_storage import RedisStorage
from pywe_user import get_all_users
from utils.redis.connect import r
WECHAT = settings.WECHAT
def fetch_users_func(authorizer_appid, get_user_infos):
print authorizer_appid, get_user_infos
def fetch_all_users(brand_id, ):
wxcfg = WECHAT.get('{}:JSAPI'.format(brand_id), {})
appid = wxcfg.get('appID')
secret = wxcfg.get('appsecret')
get_all_users(appid=appid, secret=secret, storage=RedisStorage(r), users_func=fetch_users_func)
|