mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Add an option to skip extensions installation.
This commit is contained in:
@@ -76,6 +76,10 @@ class DeployCommand(Command):
|
||||
'--extensions', type=str, nargs='*',
|
||||
help="The list of extension to deploy"
|
||||
)
|
||||
self._parser.add_argument(
|
||||
'--dont-install-extensions', action='store_true', default=False,
|
||||
help='Do not install extensions using pip'
|
||||
)
|
||||
|
||||
def _exec_django_command(self, name, cwd, *args):
|
||||
"""Run a django command for the freshly created project
|
||||
@@ -196,7 +200,7 @@ class DeployCommand(Command):
|
||||
allowed_host = "localhost"
|
||||
|
||||
extra_settings = []
|
||||
if parsed_args.extensions:
|
||||
if parsed_args.dont_install_extensions and parsed_args.extensions:
|
||||
extra_settings = self.install_extensions(parsed_args.extensions)
|
||||
|
||||
bower_components_dir = os.path.realpath(
|
||||
|
||||
@@ -28,7 +28,8 @@ class TestRunnerMixin(object):
|
||||
)
|
||||
cmd = (
|
||||
"modoboa-admin.py deploy --collectstatic "
|
||||
"--dburl {0} --extensions {1} --domain {2} {3}"
|
||||
"--dburl {0} --extensions {1} --dont-install-extensions "
|
||||
"--domain {2} {3}"
|
||||
.format(dburl, self.extension, "localhost", self.projname)
|
||||
)
|
||||
code, output = exec_cmd(cmd, cwd=self.workdir)
|
||||
|
||||
Reference in New Issue
Block a user