def handle(self, parsed_args):
        django.setup()
        management.call_command(
            'startproject', parsed_args.name, verbosity=False
        )
        path = "%(name)s/%(name)s" % {'name': parsed_args.name}
        sys.path.append(parsed_args.name)

        conn_tpl = Template(DBCONN_TPL)
        connections = {}
        if parsed_args.dburl:
            for dburl in parsed_args.dburl:
                conn_name, url = dburl.split(":", 1)
                info = dj_database_url.config(default=url)
                # In case the user fails to supply a valid database url,
                # fallback to manual mode
                if not info:
                    print "There was a problem with your database-url. \n"
                    info = self.ask_db_info(conn_name)
                # If we set this earlier, our fallback method will never
                # be triggered
                info['conn_name'] = conn_name
                connections[conn_name] = conn_tpl.render(Context(info))
        else:
            connections["default"] = conn_tpl.render(
                Context(self.ask_db_info()))

        if parsed_args.domain:
            allowed_host = parsed_args.domain
        else:
            allowed_host = raw_input(
                'What will be the hostname used to access Modoboa? '
            )
            if not allowed_host:
                allowed_host = "localhost"
        extra_settings = []
        extensions = parsed_args.extensions
        if extensions:
            if "all" in extensions:
                extensions = self._get_extension_list()
            extensions = [(extension, extension.replace("-", "_"))
                          for extension in extensions]
            if not parsed_args.dont_install_extensions:
                extra_settings = self.install_extensions(extensions)
            extensions = [extension[1] for extension in extensions]

        bower_components_dir = os.path.realpath(
            os.path.join(os.path.dirname(__file__), "../../bower_components")
        )

        mod = __import__(parsed_args.name, globals(), locals(), ['settings'])
        tpl = self._render_template(
            "%s/settings.py.tpl" % self._templates_dir, {
                'db_connections': connections,
                'secret_key': mod.settings.SECRET_KEY,
                'name': parsed_args.name,
                'allowed_host': allowed_host,
                'lang': parsed_args.lang,
                'timezone': parsed_args.timezone,
                'bower_components_dir': bower_components_dir,
                'devmode': parsed_args.devel,
                'extensions': extensions,
                'extra_settings': extra_settings
            }
        )
        with open("%s/settings.py" + path, "w") as fp:
            fp.write(tpl)
        shutil.copyfile(
            "%s/urls.py.tpl" % self._templates_dir, "%s/urls.py" % path
        )
        os.mkdir("%s/media" % parsed_args.name)

        os.unlink("%s/settings.pyc" % path)
        self._exec_django_command(
            "migrate", parsed_args.name, '--noinput'
        )
        self._exec_django_command(
            "load_initial_data", parsed_args.name
        )
        if parsed_args.collectstatic:
            self._exec_django_command(
                "collectstatic", parsed_args.name, '--noinput'
            )
        self._exec_django_command(
            "set_default_site", parsed_args.name, allowed_host
        )
dataset/ETHPy150Open tonioo/modoboa/modoboa/core/commands/deploy.py/DeployCommand.handle/operator `%` -> `+`