fix outside of application context

This commit is contained in:
pycook
2016-01-01 11:13:44 +08:00
parent 993b3637f2
commit 9d7f6c5522
6 changed files with 34 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
# encoding=utf-8
# -*- coding: utf-8 -*-
from flask.ext.mail import Mail
@@ -6,11 +6,14 @@ from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.cache import Cache
from flask.ext.celery import Celery
from lib.utils import RedisHandler
__all__ = ['mail', 'db', 'cache', 'celery']
__all__ = ['mail', 'db', 'cache', 'celery', "rd"]
mail = Mail()
db = SQLAlchemy()
cache = Cache()
celery = Celery()
celery = Celery()
rd = RedisHandler()