Esempio n. 1
0
def scan(*roots):
    """Add books to library"""
    if len(roots) == 0:
        abort('Usage:   fab scan:ROOT_PATH[,ROOT_PATH...]')

    call_roots = []
    for root in roots:
        root = path.expanduser(root)
        if path.exists(root):
            call_roots.append(path.abspath(root))
        else:
            abort('Path %s not exists' % root)

    _manage('pl_scan', "'%s'" % "' '".join(call_roots))
Esempio n. 2
0
def fast():
    """Fast tests (no db)"""
    _manage('test', 'ponylib --settings=ponylib.settings_no_db_tests --verbosity=2')
Esempio n. 3
0
def test():
    """All tests"""
    _manage('test', 'ponylib --verbosity=2')
Esempio n. 4
0
def install():
    """Upgrade project"""
    _manage('syncdb')
    _manage('migrate')
Esempio n. 5
0
def upgrade():
    """Upgrade project"""
    with lcd(settings.PROJECT_ROOT):
        local('pip install -r requirements.txt')
    _manage('syncdb')
    _manage('migrate')
Esempio n. 6
0
File: db.py Progetto: maizy/PonyLib
def setup():
    """Init or update database"""
    _manage('syncdb')
    _manage('migrate')
Esempio n. 7
0
def drop_index(force=False):
    """Drop search index"""
    _manage('pl_drop_index')
Esempio n. 8
0
File: dev.py Progetto: maizy/PonyLib
def shell():
    """Django shell"""
    _manage("shell")
Esempio n. 9
0
def build_index(force=False):
    """Update search index"""
    if force:
        _manage('pl_rebuild_index')
    else:
        _manage('pl_build_index')
Esempio n. 10
0
def drop_engine():
    """Init or update search engine"""
    _manage('pl_drop_ts_engine')
Esempio n. 11
0
def setup_engine():
    """Init or update search engine"""
    _manage('pl_setup_ts_engine')
    build_index()
Esempio n. 12
0
def cl():
    """Compile locale messages"""
    _manage('compilemessages')
Esempio n. 13
0
def up():
    """Update locales"""
    _manage('makemessages', '-l en_US')
    _manage('makemessages', '-l ru_RU')