|
|
@ -614,7 +614,7 @@ def load_dotenv(path=None): |
|
|
|
return new_dir is not None # at least one file was located and loaded |
|
|
|
return new_dir is not None # at least one file was located and loaded |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def show_server_banner(env, debug, app_import_path, eager_loading=True): |
|
|
|
def show_server_banner(env, debug, app_import_path, eager_loading): |
|
|
|
"""Show extra startup messages the first time the server is run, |
|
|
|
"""Show extra startup messages the first time the server is run, |
|
|
|
ignoring the reloader. |
|
|
|
ignoring the reloader. |
|
|
|
""" |
|
|
|
""" |
|
|
@ -623,11 +623,13 @@ def show_server_banner(env, debug, app_import_path, eager_loading=True): |
|
|
|
|
|
|
|
|
|
|
|
if app_import_path is not None: |
|
|
|
if app_import_path is not None: |
|
|
|
message = ' * Serving Flask app "{0}"'.format(app_import_path) |
|
|
|
message = ' * Serving Flask app "{0}"'.format(app_import_path) |
|
|
|
|
|
|
|
|
|
|
|
if not eager_loading: |
|
|
|
if not eager_loading: |
|
|
|
message += ' (lazy loading)' |
|
|
|
message += ' (lazy loading)' |
|
|
|
print(message) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(' * Environment: {0}'.format(env)) |
|
|
|
click.echo(message) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
click.echo(' * Environment: {0}'.format(env)) |
|
|
|
|
|
|
|
|
|
|
|
if env == 'production': |
|
|
|
if env == 'production': |
|
|
|
click.secho( |
|
|
|
click.secho( |
|
|
@ -636,7 +638,7 @@ def show_server_banner(env, debug, app_import_path, eager_loading=True): |
|
|
|
click.secho(' Use a production WSGI server instead.', dim=True) |
|
|
|
click.secho(' Use a production WSGI server instead.', dim=True) |
|
|
|
|
|
|
|
|
|
|
|
if debug is not None: |
|
|
|
if debug is not None: |
|
|
|
print(' * Debug mode: {0}'.format('on' if debug else 'off')) |
|
|
|
click.echo(' * Debug mode: {0}'.format('on' if debug else 'off')) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CertParamType(click.ParamType): |
|
|
|
class CertParamType(click.ParamType): |
|
|
|