def action_shell(params):
    from nailgun.db import db
    from nailgun.settings import settings

    if params.config_file:
        settings.update_from_file(params.config_file)
    try:
        from IPython import embed
        embed()
    except __HOLE__:
        code.interact(local={'db': db, 'settings': settings})
dataset/ETHPy150Open openstack/fuel-web/nailgun/manage.py/action_shell