コード例 #1
0
ファイル: fabfile.py プロジェクト: gitter-badger/projecta
def sync_project_to_server():
    """Synchronize project with webserver ignoring venv and sqlite db..
    This is a handy way to get your secret key to the server too...

    """
    base_path, code_path, git_url, repo_alias, site_name = get_vars()
    update_venv(code_path)
    #noinspection PyArgumentEqualDefault
    rsync_project(
        base_path,
        delete=False,
        exclude=[
            '*.pyc',
            '.git',
            '*.dmp',
            '.DS_Store',
            'projecta.db',
            'venv',
            'django_project/static'])
    update_migrations()
    with cd(os.path.join(code_path, 'django_project')):
        run('touch core/wsgi.py')
    set_media_permissions(code_path)
    set_db_permissions()
    update_migrations()
    collectstatic()
    fastprint(blue(
        'Your server is now in synchronised to your local project\n'))
コード例 #2
0
ファイル: fabfile.py プロジェクト: webgeodatavore/projecta
def sync_project_to_server():
    """Synchronize project with webserver ignoring venv and sqlite db..
    This is a handy way to get your secret key to the server too...

    """
    base_path, code_path, git_url, repo_alias, site_name = get_vars()
    update_venv(code_path)
    #noinspection PyArgumentEqualDefault
    rsync_project(
        base_path,
        delete=False,
        exclude=[
            '*.pyc',
            '.git',
            '*.dmp',
            '.DS_Store',
            'projecta.db',
            'venv',
            'django_project/static'])
    update_migrations()
    with cd(os.path.join(code_path, 'django_project')):
        run('touch core/wsgi.py')
    set_media_permissions(code_path)
    set_db_permissions()
    update_migrations()
    collectstatic()
    fastprint(blue(
        'Your server is now in synchronised to your local project\n'))
コード例 #3
0
def sync_media_to_server():
    """Sync media to server from local filesystem."""
    base_path, code_path, git_url, repo_alias, site_name = get_vars()
    remote_path = os.path.join(code_path, "django_project", "media")
    local_path = os.path.join(os.path.dirname(__file__), "django_project", "media/")
    rsync_project(remote_path, local_dir=local_path, exclude=["*.pyc", "*.py", ".DS_Store"])

    # Now our sqlite db
    remote_path = os.path.join(code_path, "resources", "sqlite", "projecta.db")
    local_path = os.path.join(os.path.dirname(__file__), "resources/sqlite/projecta.db")
    rsync_project(remote_path, local_dir=local_path, exclude=["*.pyc", "*.py", ".DS_Store"])
    set_media_permissions(code_path)
    set_db_permissions()
コード例 #4
0
ファイル: fabfile.py プロジェクト: gitter-badger/projecta
def sync_media_to_server():
    """Sync media to server from local filesystem."""
    base_path, code_path, git_url, repo_alias, site_name = get_vars()
    remote_path = os.path.join(code_path, 'django_project', 'media')
    local_path = os.path.join(
        os.path.dirname(__file__), 'django_project', 'media/')
    rsync_project(
        remote_path,
        local_dir=local_path,
        exclude=['*.pyc', '*.py', '.DS_Store'])

    # Now our sqlite db
    remote_path = os.path.join(
        code_path, 'resources', 'sqlite', 'projecta.db')
    local_path = os.path.join(
        os.path.dirname(__file__), 'resources/sqlite/projecta.db')
    rsync_project(
        remote_path,
        local_dir=local_path,
        exclude=['*.pyc', '*.py', '.DS_Store'])
    set_media_permissions(code_path)
    set_db_permissions()
コード例 #5
0
ファイル: fabfile.py プロジェクト: webgeodatavore/projecta
def sync_media_to_server():
    """Sync media to server from local filesystem."""
    base_path, code_path, git_url, repo_alias, site_name = get_vars()
    remote_path = os.path.join(code_path, 'django_project', 'media')
    local_path = os.path.join(
        os.path.dirname(__file__), 'django_project', 'media/')
    rsync_project(
        remote_path,
        local_dir=local_path,
        exclude=['*.pyc', '*.py', '.DS_Store'])

    # Now our sqlite db
    remote_path = os.path.join(
        code_path, 'resources', 'sqlite', 'projecta.db')
    local_path = os.path.join(
        os.path.dirname(__file__), 'resources/sqlite/projecta.db')
    rsync_project(
        remote_path,
        local_dir=local_path,
        exclude=['*.pyc', '*.py', '.DS_Store'])
    set_media_permissions(code_path)
    set_db_permissions()