文件上传
This commit is contained in:
+17
-1
@@ -1,3 +1,19 @@
|
||||
from cachelib import RedisCache
|
||||
from flask import current_app
|
||||
from cachelib.file import FileSystemCache
|
||||
from cachelib.memcached import MemcachedCache
|
||||
from cachelib.redis import RedisCache
|
||||
from cachelib.simple import SimpleCache
|
||||
from cachelib.uwsgi import UWSGICache
|
||||
|
||||
cacher: dict = {
|
||||
'filesystem': FileSystemCache,
|
||||
'memcached': MemcachedCache,
|
||||
'redis': RedisCache,
|
||||
'simple': SimpleCache,
|
||||
'uwsgi': UWSGICache
|
||||
}
|
||||
cache = RedisCache()
|
||||
|
||||
|
||||
def get_cache():
|
||||
return cache.get(current_app.config.get("CACHE_TYPE") or "filesystem")()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from flask_migrate import Migrate
|
||||
|
||||
from common.extend.orm import db
|
||||
# from entrance.models import model_lists
|
||||
from entrance.models import model_lists
|
||||
|
||||
migrate = Migrate(db=db, directory='entrance/migrations')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user