Fleshing out the Task model and related access points

This commit is contained in:
2012-10-19 22:17:03 +01:00
parent 6afe3c7345
commit da2bf07f9f
12 changed files with 156 additions and 4 deletions

19
fabfile.py vendored Normal file
View File

@@ -0,0 +1,19 @@
from __future__ import with_statement
from fabric.api import task, prefix, env, local
env.shell = '/bin/bash -l -c'
###### Local Tasks
@task
def runserver(port=3333):
with prefix('. .env/bin/activate'):
ip = local("""ip addr list eth0 |grep "inet " |cut -d' ' -f6|cut -d/ -f1""", capture=True)
local('django_ett/manage.py runserver %s:%s' % (ip, port), capture=False)
@task
def test():
with prefix('. .env/bin/activate'):
local('django_ett/manage.py test --noinput --failfast')