pub1c-web/app/glob.py
2021-10-07 13:39:09 +03:00

18 lines
355 B
Python

from flask import g
from app.config import load_config, config_location
from app.manager import PublicationManager
def get_config():
if 'config' not in g:
g.config = load_config(config_location())
return g.config
def get_manager():
if 'manager' not in g:
g.manager = PublicationManager(get_config())
return g.manager