def _startproject(self, context):
"""
Create a new django project
"""
dj_admin_script = os.path.join(context.bin_path, 'django-admin')
print(Fore.GREEN + "[qoqa] initializing django project")
subprocess.run([
dj_admin_script,
'startproject',
'--template='+template_zip,
self._project_name])
print(Fore.GREEN + "[qoqa] django project directory created")
os.chdir(self._project_name)
with open('__init__.py', 'a'):
pass
os.chmod('manage.py', stat.S_IRWXU)
评论列表
文章目录