test_cmd.py
author Alexander Solovyov <piranha@piranha.org.ua>
Wed, 19 Aug 2009 12:35:31 +0300
changeset 77 2f1dfda4cfb3
parent 75 2782b2406ba8
child 87 ec9736668bca
permissions -rwxr-xr-x
Added tag 0.9.7 for changeset d4bdbbf7a500

#!/usr/bin/env python

import opster

config_opts=[('c', 'config', 'webshops.ini', 'config file to use')]


@opster.command(config_opts)
def initdb(config):
    """Initialize database"""
    pass


@opster.command(options=config_opts + [
    ('h', 'host', 'localhost', 'The host for the application.'),
    ('p', 'port', 5000, 'The port for the server.'),
    ('', 'nolint', False, 'Do not use LintMiddleware')
])
def runserver(**opts):
    """Run development server"""
    print opts


opster.dispatch()