def start(project_name, destination, domain=None, app_id=None):
"""
Start a new project with wq.app and wq.db. A new Django project will be
created from a wq-specific template. After running this command, you may
want to do the following:
\b
sudo chown www-data media/
cd app
wq init
See https://wq.io/docs/setup for more tips on getting started with wq.
"""
if app_id is None:
app_id = '.'.join(reversed(domain.split('.')))
args = [project_name]
if destination:
args.append(destination)
kwargs = dict(
template=template,
extensions="py,yml,conf,html,sh,js,css,json,xml".split(","),
domain=domain,
app_id=app_id,
wq_start_version=VERSION,
)
call_command(StartProjectCommand(), *args, **kwargs)
path = destination or project_name
txt = os.path.join(path, 'requirements.txt')
print_versions(txt, [
'wq.app',
'wq.db',
])
shutil.copytree(
resource_filename('xlsconv', 'templates'),
os.path.join(path, 'master_templates'),
ignore=shutil.ignore_patterns("*.py-tpl"),
)
评论列表
文章目录