modified import statements in deploy to resolve conflict that led to docker and database modules being considered a submodule of deploy

This commit is contained in:
Ronny Abraham 2018-10-24 02:42:27 +03:00
parent 4eba2cbf5a
commit b9d252a1fc

View file

@ -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()
#