コード例 #1
0
ファイル: fabfile.py プロジェクト: volivares/luke
def makemigrations(*args, **kwargs):
    """
    Creates the new migrations based on the project's models changes.
    """
    with virtualenv():
        run(join('python manage.py makemigrations',
                 options(**kwargs), arguments(*args)))
コード例 #2
0
ファイル: fabfile.py プロジェクト: jualjiman/finanzas
def makemigrations(*args, **kwargs):
    """
    Creates the new migrations based on the project's models changes.
    """
    with virtualenv():
        run(join('python manage.py makemigrations',
                 options(**kwargs), arguments(*args)))
コード例 #3
0
ファイル: fabfile.py プロジェクト: volivares/luke
def migrate(*args, **kwargs):
    """
    Syncs the DB and applies the available migrations.
    """
    with virtualenv():
        run(join('python manage.py migrate',
                 options(**kwargs), arguments(*args)))
コード例 #4
0
ファイル: fabfile.py プロジェクト: jualjiman/finanzas
def migrate(*args, **kwargs):
    """
    Syncs the DB and applies the available migrations.
    """
    with virtualenv():
        run(join('python manage.py migrate',
                 options(**kwargs), arguments(*args)))
コード例 #5
0
def bower_install(*args, **kwargs):
    """
    Installs frontend dependencies with bower.
    """
    with node():
        run(join('bower install',
                 options(**kwargs), arguments(*args)))
コード例 #6
0
ファイル: fabfile.py プロジェクト: Fabfm4/Sita-BackEnd
def loaddata(*args):
    """Loads the given data fixtures into the project's database.

    Args:
        args(str): Name fixture.

    Usage:
        >>>fab environment:vagrant loaddata:'fixture'.
    """
    with virtualenv():
        run(join('python manage.py loaddata', arguments(*args)))
コード例 #7
0
ファイル: fabfile.py プロジェクト: GloriaPG/notivinco
def loaddata(*args):
    """Loads the given data fixtures into the project's database.

    Args:
        args(str): Name fixture.

    Usage:
        >>>fab environment:vagrant loaddata:'fixture'.
    """
    with virtualenv():
        run(join('python manage.py loaddata', arguments(*args)))
コード例 #8
0
ファイル: fabfile.py プロジェクト: Fabfm4/Sita-BackEnd
def startapp(app_name):
    """Create new app

    Create a new app inside the Django project.

    Args:
        app_name(str): Name of new app inside project.

    Usage:
        >>> fab environment:vagrant start_app:'app_name'.
    """
    with virtualenv():
        run(join('python manage.py startapp', app_name))
コード例 #9
0
ファイル: fabfile.py プロジェクト: GloriaPG/notivinco
def startapp(app_name):
    """Create new app

    Create a new app inside the Django project.

    Args:
        app_name(str): Name of new app inside project.

    Usage:
        >>> fab environment:vagrant start_app:'app_name'.
    """
    with virtualenv():
        run(join('python manage.py startapp', app_name))
コード例 #10
0
ファイル: fabfile.py プロジェクト: jantonio471/socialregister
def makemigrations(*args, **kwargs):
    """Creates the new migrations based on the project's models changes.

    Creating new migrations based on the changes you have made to your models.

    Args:
        args (Optional[str]): Create migration for app_name.

    Example:
        fab environment:vagrant makemigrations.
    """
    with virtualenv():
        run(join('python manage.py makemigrations',
                 options(**kwargs), arguments(*args)))
コード例 #11
0
ファイル: fabfile.py プロジェクト: GloriaPG/notivinco
def makemigrations(*args, **kwargs):
    """Creates the new migrations based on the project's models changes.

    Creating new migrations based on the changes you have made to your models.

    Args:
        args (Optional[str]): Create migration for app_name.

    Example:
        fab environment:vagrant makemigrations.
    """
    with virtualenv():
        run(join('python manage.py makemigrations',
                 options(**kwargs), arguments(*args)))
コード例 #12
0
ファイル: fabfile.py プロジェクト: GloriaPG/notivinco
def migrate(*args, **kwargs):
    """Apply migrations.

    Syncs the DB and applies the available migrations.

    Args:
        args (Optional[str]): Specified apps has its migrations.
        kwargs (Optional[str]): Brings the database schema to state where the
                                named migration is applied (migrate_name).

    Example:
        >>>fab environment:vagrant migrate.
    """
    with virtualenv():
        run(join('python manage.py migrate',
                 options(**kwargs), arguments(*args)))
コード例 #13
0
ファイル: fabfile.py プロジェクト: jantonio471/socialregister
def migrate(*args, **kwargs):
    """Apply migrations.

    Syncs the DB and applies the available migrations.

    Args:
        args (Optional[str]): Specified apps has its migrations.
        kwargs (Optional[str]): Brings the database schema to state where the
                                named migration is applied (migrate_name).

    Example:
        >>>fab environment:vagrant migrate.
    """
    with virtualenv():
        run(join('python manage.py migrate',
                 options(**kwargs), arguments(*args)))
コード例 #14
0
ファイル: fabfile.py プロジェクト: Fabfm4/Sita-BackEnd
def inspectdb(filename=""):
    """Inspection database.

    Allows the inspection of legacy databases inside Django projects.

    Args:
        filename(str): Name output file.

    Usage:
        >>> fab environment:vagrant inspectdb
        Print the models needed to work with the database

        >>> fab environment:vagrant inspectdb:'filename'
        Use 'filename' as the output file.
    """
    with virtualenv():
        if (filename == ""):
            run('python manage.py inspectdb')
        else:
            run(join('python manage.py inspectdb > ', filename))
コード例 #15
0
ファイル: fabfile.py プロジェクト: GloriaPG/notivinco
def inspectdb(filename=""):
    """Inspection database.

    Allows the inspection of legacy databases inside Django projects.

    Args:
        filename(str): Name output file.

    Usage:
        >>> fab environment:vagrant inspectdb
        Print the models needed to work with the database

        >>> fab environment:vagrant inspectdb:'filename'
        Use 'filename' as the output file.
    """
    with virtualenv():
        if(filename == ""):
            run('python manage.py inspectdb')
        else:
            run(join('python manage.py inspectdb > ', filename))
コード例 #16
0
ファイル: fabfile.py プロジェクト: jualjiman/finanzas
def loaddata(*args):
    """
    Loads the given data fixtures into the project's database.
    """
    with virtualenv():
        run(join('python manage.py loaddata', arguments(*args)))
コード例 #17
0
ファイル: fabfile.py プロジェクト: volivares/luke
def loaddata(*args):
    """
    Loads the given data fixtures into the project's database.
    """
    with virtualenv():
        run(join('python manage.py loaddata', arguments(*args)))