文件上传

This commit is contained in:
resonate
2022-01-24 12:52:12 +08:00
parent 9bfdac0953
commit 9b8d632995
10 changed files with 176 additions and 3 deletions
+17 -1
View File
@@ -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 -1
View File
@@ -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')