# Path: moedjpack/moepad/mpconf.py
# class MpConfig(object):
# class MpConfigRedisHandler(MpConfig):
#     def __init__(self):
#     def getConfig(self):
#     def __init__(self):
#     def getConfig(self):
# 
# Path: moedjpack/moepad/weibowrapper.py
# class WeiboAuthInfoRedis(WeiboAuthInfo):
#     def __init__(self, user_type):
#         super(WeiboAuthInfoRedis, self).__init__(user_type)
#         self.mckey = "WeiboAuth" + user_type
# 
#     def load(self):
#         args = rs.get(self.mckey)
#         if args:
#             for key in args.keys():
#                 setattr(self, key, args[key])
# 
#     def save(self):
#         print self.__dict__
#         confs = sub_dict(self.__dict__,
#                          ['uid', 'access_token', 'expires_in', 'user_type'])
#         rs.hmset(self.mckey, confs)
#         rs.expire(self.mckey, confs['expires_in'])
# 
#     def clean(self):
#         rs.hdel(self.mckey)
# 
# Path: moedjpack/moepad/mputils.py
# def sub_dict(somedict, somekeys, default=None):
# def loggerInit(logfile):
# def utcnow():
# def _deletePrefix(key):
# def create_default_db():


import logging
import redis
import pickle
from django.http import HttpResponse
from django.shortcuts import *
from django.contrib.auth.decorators import login_required
from moedjpack import qqweibo
from moedjpack.moepad.mpconf import MPConf
from moedjpack.moepad.weibowrapper import WeiboAuthInfoRedis
from moedjpack.moepad import weibo
from moedjpack.moepad.mputils import rs
# -*- coding: utf-8 -*-




log = logging.getLogger('moepad')

SinaAppKey = MPConf.SinaAppKey
SinaAppSecret = MPConf.SinaAppSecret

# Path: moedjpack/moepad/mpconf.py
# class MpConfig(object):
# class MpConfigRedisHandler(MpConfig):
#     def __init__(self):
#     def getConfig(self):
#     def __init__(self):
#     def getConfig(self):
# 
# Path: moedjpack/moepad/weibowrapper.py
# class WeiboAuthInfoRedis(WeiboAuthInfo):
#     def __init__(self, user_type):
#         super(WeiboAuthInfoRedis, self).__init__(user_type)
#         self.mckey = "WeiboAuth" + user_type
# 
#     def load(self):
#         args = rs.get(self.mckey)
#         if args:
#             for key in args.keys():
#                 setattr(self, key, args[key])
# 
#     def save(self):
#         print self.__dict__
#         confs = sub_dict(self.__dict__,
#                          ['uid', 'access_token', 'expires_in', 'user_type'])
#         rs.hmset(self.mckey, confs)
#         rs.expire(self.mckey, confs['expires_in'])
# 
#     def clean(self):
#         rs.hdel(self.mckey)
# 
# Path: moedjpack/moepad/mputils.py
# def sub_dict(somedict, somekeys, default=None):
# def loggerInit(logfile):
# def utcnow():
# def _deletePrefix(key):
# def create_default_db():


# Path: moedjpack/auth/views.py
import logging
import redis
import pickle
from django.http import HttpResponse
from django.shortcuts import *
from django.contrib.auth.decorators import login_required
from moedjpack import qqweibo
from moedjpack.moepad.mpconf import MPConf
from moedjpack.moepad.weibowrapper import WeiboAuthInfoRedis
from moedjpack.moepad import weibo
from moedjpack.moepad.mputils import rs

# -*- coding: utf-8 -*-




log = logging.getLogger('moepad')

SinaAppKey = MPConf.SinaAppKey
SinaAppSecret = MPConf.SinaAppSecret

MoePadSite = MPConf.Domain