mirror of
https://github.com/fergalmoran/bitchmin.git
synced 2026-02-15 12:24:05 +00:00
19 lines
516 B
Python
19 lines
516 B
Python
import os
|
|
|
|
|
|
def load_config(mode=os.environ.get('FLASK_ENV')):
|
|
"""Load config."""
|
|
try:
|
|
if mode == 'production':
|
|
from .production import ProductionConfig
|
|
return ProductionConfig
|
|
elif mode == 'testing':
|
|
from .testing import TestingConfig
|
|
return TestingConfig
|
|
else:
|
|
from .development import DevelopmentConfig
|
|
return DevelopmentConfig
|
|
except ImportError:
|
|
from .config import Config
|
|
return Config
|