Commit 2b9e8fa 1 parent 5368451 commit 2b9e8fa Copy full SHA for 2b9e8fa
File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 14
14
15
15
Utils .local_path .cached_path = os .path .dirname (__file__ ) or "." # py3.8 is not abs. remove "." when dropping 3.8
16
16
17
- from WebHostLib import register , app as raw_app
17
+ from WebHostLib import register , cache , app as raw_app
18
18
from waitress import serve
19
19
20
20
from WebHostLib .models import db
@@ -40,6 +40,7 @@ def get_app():
40
40
app .config ["HOST_ADDRESS" ] = Utils .get_public_ipv4 ()
41
41
logging .info (f"HOST_ADDRESS was set to { app .config ['HOST_ADDRESS' ]} " )
42
42
43
+ cache .init_app (app )
43
44
db .bind (** app .config ["PONY" ])
44
45
db .generate_mapping (create_tables = True )
45
46
return app
Original file line number Diff line number Diff line change 49
49
'create_db' : True
50
50
}
51
51
app .config ["MAX_ROLL" ] = 20
52
- app .config ["CACHE_TYPE" ] = "flask_caching.backends. SimpleCache"
52
+ app .config ["CACHE_TYPE" ] = "SimpleCache"
53
53
app .config ["JSON_AS_ASCII" ] = False
54
54
app .config ["HOST_ADDRESS" ] = ""
55
55
56
- cache = Cache (app )
56
+ cache = Cache ()
57
57
Compress (app )
58
58
59
59
You can’t perform that action at this time.
0 commit comments