Skip to content

Define reloader extra_files in flask run CLI  #2897

@rochacbruno

Description

@rochacbruno

Expected Behavior

I expected to have FLASK_RUN_EXTRA_FILES to be processed in the same way of FLASK_RUN_PORT and FLASK_RUN_HOST

When using the old style app.run we can define an extra_files to be watched for changes by the reloader, that is useful for example, if you have a static settings file like settings.toml (using dynaconf) or another kind of static config or themed templates loaded from other paths

Actual Behavior

In the run command https://github.com/pallets/flask/blob/master/flask/cli.py#L775 the argument extra_files is not being passed to wekzeug.run_simple https://github.com/pallets/werkzeug/blob/master/werkzeug/serving.py#L738

Suggestion

Add FLASK_RUN_EXTRA_FILES="path1,path2,path" to flask run command.

or

Map all variables from werkzeug.run_simple - https://github.com/pallets/werkzeug/blob/master/werkzeug/serving.py#L738

In to FLASK_RUN_* prefixed env var or WERKZEUG_RUN_* prefixed env var.

Environment

  • Python version: 3.6
  • Flask version: 1.0.2
  • Werkzeug version: 0.14.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions