bootstrap make it work

This commit is contained in:
Daniel Tsvetkov 2020-06-04 22:11:57 +02:00
parent 622b27bcce
commit 1261536737
5 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,4 @@
from webapp.models import db
from oshipka.persistance import db
def populate_db(app):

View File

View File

@ -102,6 +102,8 @@ bootstrap() {
mkdir -p ${PROJECT_PATH}
cp -r ${OSHIPKA_PATH}/bootstrap/* ${PROJECT_PATH}/
cp ${OSHIPKA_PATH}/bootstrap/.gitignore ${PROJECT_PATH}/.gitignore
mkdir ${PROJECT_PATH}/data
mkdir ${PROJECT_PATH}/webapp/view_models
cd ${PROJECT_PATH}
init_venv
link_dev_oshipka

View File

@ -12,6 +12,7 @@ Flask-Login==0.5.0
Flask-Mail==0.9.1
Flask-Migrate==2.5.3
Flask-Principal==0.4.0
Flask-Script==2.0.6
Flask-Security==3.0.0
Flask-SQLAlchemy==2.4.1
Flask-Table==0.5.0

View File

@ -104,8 +104,8 @@ if __name__ == "__main__":
WEBAPP_PATH = os.path.join(basepath, "webapp")
VIEW_MODELS_PATH = os.path.join(WEBAPP_PATH, "view_models")
MODELS_PATH = os.path.join(WEBAPP_PATH, "models")
if not os.path.exists(MODELS_PATH):
os.makedirs(MODELS_PATH)
for d in [VIEW_MODELS_PATH,MODELS_PATH ]:
os.makedirs(d, exist_ok=True)
HTML_TEMPLATES_PATH = os.path.join(WEBAPP_PATH, "templates")
env = Environment(