Skip to content

Commit

Permalink
Add support for conda
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Aug 27, 2016
1 parent 9777f4b commit 9563d59
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions djangocms_installer/django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ def create_project(config_data):
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')
start_cmds = [start_cmd]
start_cmd_pnodes = ['Scripts']
start_cmds.extend([
os.path.join(os.path.dirname(sys.executable), pnode, 'django-admin.py')
for pnode in start_cmd_pnodes
])
for p in start_cmds:
if os.path.exists(p):
start_cmd = p
break
cmd_args = ' '.join([sys.executable, start_cmd, 'startproject'] + args)
if config_data.verbose:
sys.stdout.write('Project creation command: {0}\n'.format(cmd_args))
Expand Down

0 comments on commit 9563d59

Please sign in to comment.