Example #1
0
def runserver():
    """Runs the Django development server"""

    print green("Running the development webserver...")
    denv = _utils.dot_env()
    host = denv.get('SERVER_HOST', '0.0.0.0')
    port = denv.get('PORT', '8000')
    _utils.manage_py('runserver %s:%s' % (host, port))
Example #2
0
def reset_db():
    """Removes all of the tables"""
    _utils.manage_py("reset_db")
Example #3
0
def migrate():
    """Runs migrations"""

    print green("Running migrations...")
    if _utils.manage_py('migrate'):
        print "Migrations successful."
Example #4
0
def build_static():
    """Builds static files for production"""

    print green("Gathering and preprocessing static files...")
    _utils.manage_py('collectstatic --noinput')
    _utils.manage_py('compress')
Example #5
0
def manage(command):
    """Run a Django management command."""
    _utils.manage_py(command)