forked from rDrama/rDrama
move site settings into redis 2
parent
a7b67db555
commit
7848b12fdd
|
@ -81,8 +81,11 @@ cache = Cache(app)
|
|||
Compress(app)
|
||||
mail = Mail(app)
|
||||
|
||||
if not cache.get(f'{app.config["SERVER_NAME"]}_settings'):
|
||||
cache.set(f'{app.config["SERVER_NAME"]}_settings', {"Bots": True, "Fart mode": False, "Read-only mode": False, "Signups": True})
|
||||
settings = cache.get(f'{app.config["SERVER_NAME"]}_settings')
|
||||
if not settings:
|
||||
settings = {"Bots": True, "Fart mode": False, "Read-only mode": False, "Signups": True}
|
||||
cache.set(f'{app.config["SERVER_NAME"]}_settings', settings)
|
||||
app.config['SETTINGS'] = settings
|
||||
|
||||
@app.before_request
|
||||
def before_request():
|
||||
|
|
Loading…
Reference in New Issue