def create_project(config_data):
    env = deepcopy(dict(os.environ))
    env[str('DJANGO_SETTINGS_MODULE')] = str('{0}.settings'.format(config_data.project_name))
    env[str('PYTHONPATH')] = str(os.pathsep.join(map(shlex_quote, sys.path)))
    kwargs = {}
    args = []
    if config_data.template:
        kwargs['template'] = config_data.template
    args.append(config_data.project_name)
    if config_data.project_directory:
        args.append(config_data.project_directory)
        if not os.path.exists(config_data.project_directory):
            os.makedirs(config_data.project_directory)
    start_cmd = os.path.join(os.path.dirname(sys.executable), 'django-admin.py')
    cmd_args = ' '.join([sys.executable, start_cmd, 'startproject'] + args)
    if config_data.verbose:
        sys.stdout.write('Project creation command: {0}\n'.format(cmd_args))
    output = subprocess.check_output(cmd_args, shell=True)
    sys.stdout.write(output.decode('utf-8'))
Test index page at /projects
dataset/ETHPy150Open nephila/djangocms-installer/djangocms_installer/django/__init__.py/create_project--crossover with--dataset/ETHPy150Open treeio/treeio/treeio/projects/api/tests.py/ProjectsAPITest.test_unauthenticated_access