18 lines
355 B
Python
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 |