pub1c-web/app/glob.py

18 lines
355 B
Python
Raw Normal View History

2021-10-07 10:39:09 +00:00
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