# Path: jarr/bootstrap.py
# def is_secure_served():
# def init_logging(log_path=None, log_level=logging.INFO, modules=(),
#                  log_format='%(asctime)s %(levelname)s %(message)s'):
# def init_db(echo=False):
# def init_models():
# def commit_pending_sql(*args, **kwargs):
# def rollback_pending_sql(*args, **kwargs):
# REDIS_CONN = Redis(host=conf.db.redis.host,
#                    db=conf.db.redis.db,
#                    port=conf.db.redis.port)


import click
from werkzeug.middleware.proxy_fix import ProxyFix
from jarr.api import create_app
from jarr.bootstrap import Base
from flask_migrate import Migrate
    from jarr.controllers.user import UserController
#! /usr/bin/env python
# -*- coding: utf-8 -*-



_app = create_app()
application = ProxyFix(_app, x_for=1, x_proto=1, x_host=1, x_port=1)
migrate = Migrate(db=Base)
migrate.init_app(_app)


@_app.cli.command("bootstrap-database")
@click.option("--admin_login", default="admin")
@click.option("--admin_password", default="admin")
def bootstrap_database(admin_login, admin_password):
    """Will create the database from conf parameters."""
    admin = {'is_admin': True, 'is_api': True,
             'login': admin_login, 'password': admin_password}

# Path: jarr/bootstrap.py
# def is_secure_served():
# def init_logging(log_path=None, log_level=logging.INFO, modules=(),
#                  log_format='%(asctime)s %(levelname)s %(message)s'):
# def init_db(echo=False):
# def init_models():
# def commit_pending_sql(*args, **kwargs):
# def rollback_pending_sql(*args, **kwargs):
# REDIS_CONN = Redis(host=conf.db.redis.host,
#                    db=conf.db.redis.db,
#                    port=conf.db.redis.port)


# Path: wsgi.py
import click
from werkzeug.middleware.proxy_fix import ProxyFix
from jarr.api import create_app
from jarr.bootstrap import Base
from flask_migrate import Migrate
    from jarr.controllers.user import UserController

#! /usr/bin/env python
# -*- coding: utf-8 -*-



_app = create_app()
application = ProxyFix(_app, x_for=1, x_proto=1, x_host=1, x_port=1)
migrate = Migrate(db=Base)
migrate.init_app(_app)


@_app.cli.command("bootstrap-database")
@click.option("--admin_login", default="admin")
@click.option("--admin_password", default="admin")
def bootstrap_database(admin_login, admin_password):
    """Will create the database from conf parameters."""
    admin = {'is_admin': True, 'is_api': True,
             'login': admin_login, 'password': admin_password}

    Base.metadata.create_all()