apache_restarter
app
api
__init__.py
app.py
brackets.py
config.py
glob.py
manager.py
utils.py
frontend
test
tests
webpub1c
.gitignore
.gitmodules
config.yml
requirements.txt
run.py
run.sh
webpub1c-admin.service
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 |