Esempio n. 1
0
def migrate(*args, **kwargs):
    """
    Syncs the DB and applies the available migrations.
    """
    with virtualenv():
        run(join('python manage.py migrate',
                 options(**kwargs), arguments(*args)))
Esempio n. 2
0
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)))
Esempio n. 3
0
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)))
Esempio n. 4
0
def migrate(*args, **kwargs):
    """
    Syncs the DB and applies the available migrations.
    """
    with virtualenv():
        run(join('python manage.py migrate',
                 options(**kwargs), arguments(*args)))
Esempio n. 5
0
def bower_install(*args, **kwargs):
    """
    Installs frontend dependencies with bower.
    """
    with node():
        run(join('bower install',
                 options(**kwargs), arguments(*args)))
Esempio n. 6
0
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)))
Esempio n. 7
0
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)))
Esempio n. 8
0
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)))
Esempio n. 9
0
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)))
Esempio n. 10
0
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)))
Esempio n. 11
0
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)))
Esempio n. 12
0
def loaddata(*args):
    """
    Loads the given data fixtures into the project's database.
    """
    with virtualenv():
        run(join('python manage.py loaddata', arguments(*args)))
Esempio n. 13
0
def loaddata(*args):
    """
    Loads the given data fixtures into the project's database.
    """
    with virtualenv():
        run(join('python manage.py loaddata', arguments(*args)))