projects.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:wq.start 作者: wq 项目源码 文件源码
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"),
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号