mirror of
https://github.com/nikdoof/django-ett.git
synced 2025-12-18 12:19:23 +00:00
Fleshing out the Task model and related access points
This commit is contained in:
19
fabfile.py
vendored
Normal file
19
fabfile.py
vendored
Normal 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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user