Skip to content

Commit

Permalink
Fix get command with Django (#804)
Browse files Browse the repository at this point in the history
Fix #789
  • Loading branch information
rochacbruno committed Sep 6, 2022
1 parent a55cdba commit e1ba815
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dynaconf/cli.py
Expand Up @@ -43,6 +43,8 @@ def set_settings(ctx, instance=None):

settings = None

_echo_enabled = ctx.invoked_subcommand not in ["get", None]

if instance is not None:
if ctx.invoked_subcommand in ["init"]:
raise click.UsageError(
Expand All @@ -57,7 +59,7 @@ def set_settings(ctx, instance=None):

flask_app = ScriptInfo().load_app()
settings = FlaskDynaconf(flask_app, **flask_app.config).settings
click.echo(
_echo_enabled and click.echo(
click.style(
"Flask app detected", fg="white", bg="bright_black"
)
Expand All @@ -73,7 +75,7 @@ def set_settings(ctx, instance=None):
settings = LazySettings()

if settings is not None:
click.echo(
_echo_enabled and click.echo(
click.style(
"Django app detected", fg="white", bg="bright_black"
)
Expand Down

0 comments on commit e1ba815

Please sign in to comment.