diff --git a/backend/apps/template/template.py b/backend/apps/template/template.py new file mode 100644 index 0000000..e342a84 --- /dev/null +++ b/backend/apps/template/template.py @@ -0,0 +1,15 @@ +import yaml + +base_template = None + + +def load(): + with open('./template.yaml', 'r', encoding='utf-8') as f: + global base_template + base_template = yaml.load(f, Loader=yaml.SafeLoader) + + +def get_base_template(): + if not base_template: + load() + return base_template