diff --git a/modules/deploy.py b/modules/deploy.py index 18bcfb5..f7f9df1 100644 --- a/modules/deploy.py +++ b/modules/deploy.py @@ -24,13 +24,16 @@ from .django import generate as django_generate from .django import collectstatic as django_collectstatic from . import initialize -from . import docker -from . import database as db - import os import logging +# NOTE: +# we have a bunch of imports scattered through the func definitions +# this is done b/c otherwise fabric will consider the modules we are +# importing from to be a SUB-MODULE of deploy. So leave them where +# they are + @task def setup_rootpath(): @@ -76,6 +79,7 @@ def setup_rootpath(): @task def bootstrap(): + from . import docker configuration = env.config if env.debug: @@ -191,6 +195,7 @@ def bootstrap(): # # create and initialize the database + from . import database as db print_console("in db.generate") db.generate() @@ -224,6 +229,7 @@ def bootstrap_part1(): @task def bootstrap_part2(): + from . import docker configuration = env.config if env.debug: @@ -326,6 +332,8 @@ def bootstrap_part2(): # # create and initialize the database + from . import database as db + print_console("in db.generate") db.generate() @@ -682,6 +690,7 @@ def remove(full=True): nginx_remove() supervisor_remove() + from . import database as db db.drop_all() #