zilla / fabfile.py

import os
from fabric.api import local #, run

def create_config():
    if not os.path.exists("zilla.conf"):
        local("cp etc/development.conf zilla.conf")

def static():
    local("python zilla/manage.py collectstatic --noinput")

def test():
    test_command = """DJANGO_SETTINGS_MODULE=zilla.settings PYTHONPATH="." nosetests --with-django zilla --nocapture"""
    local(test_command)

def coverage():
    coverage_command = """DJANGO_SETTINGS_MODULE=zilla.settings PYTHONPATH="." nosetests --with-coverage --cover-package=zilla --with-django zilla --nocapture"""
    local(coverage_command)

def nosy():
    command = """DJANGO_SETTINGS_MODULE=zilla.settings PYTHONPATH="." nosy -c  etc/nosy.cfg"""
    local(command)

def dependencies():
    local("pip install -r etc/requirements.txt")

def init():
    local("python zilla/manage.py syncdb")

def install():
    dependencies()
    create_config()
    test()
    init()

def devserver():
    static()
    local("twistd -n zilla")

def daemon():
    static()
    local("twistd --pidfile=zilla.pid zilla --rotate --logfile=zilla.log ")
    
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.