#!/usr/bin/env python

from functools import partial

from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand

from {{ name }}.boot import create_app

if __name__ == "__main__":
  create_app = partial(create_app, name="{{ name }}")

  manager = Manager(create_app)

  manager.add_option('--env', dest='env', required=False, default="development")
  manager.add_option('-rn', '--runner', dest='runner', required=False,
                     default="default")

  manager.add_command('db', MigrateCommand)
  manager.run()
