refactor: make last web views work

This commit is contained in:
Dobin
2024-03-27 20:38:47 +00:00
parent 4064cf94ba
commit 29d84ad077
4 changed files with 39 additions and 36 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import yaml
from typing import List, Tuple
from model.settings import Settings
from model.defs import *
class Project():
def __init__(self, name: str, settings: Settings):
@@ -28,8 +28,8 @@ class Storage():
self.save_data()
# directories and contents
os.makedirs("app/projects/{}".format(project.name), exist_ok=True)
with open("app/projects/{}/settings.yaml".format(project.name), "w") as f:
os.makedirs(PATH_WEB_PROJECT + project.name, exist_ok=True)
with open("{}/{}/settings.yaml".format(PATH_WEB_PROJECT, project.name), "w") as f:
f.write(yaml.dump(project.settings))
def get_data(self) -> List[Project]: