def migrate(): "Django Syncdb" with virtualenv(): py('manage.py migrate')
def static(): "Collect Static Files" with virtualenv(): py('manage.py collectstatic -l --noinput')
def command(*args): "Send custom command with args or not. Usage: fab command:mycustom,123 or fab command:mycustom" with virtualenv(): py('manage.py ' + " ".join(args))
def syncdb(): "South Migration" with virtualenv(): py('manage.py syncdb')
def dbshell(): "Django DB Shell" with virtualenv(): py('manage.py dbshell')
def shell(): "Django Shell" with virtualenv(): py('manage.py shell')
def fixture(): "Django Syncdb" with virtualenv(): py('python3 manage.py dumpdata --format=json >fixtures/initial_data.json' )
def fixture_load(): with virtualenv(): py('python3 manage.py loaddata fixtures/initial_data.json')