Join GitHub today
Simplify adding extra files to watch during development #43
During development, Werkzeug's reloader watches just Python files and Jinja templates. Normally, this can be extended by the
app.run(host='0.0.0.0', ..., extra_files=['woohoo.yml'])
Elsa doesn't support this:
Following workaround works, but it would be nice if Elsa was able to propagate the option in some way, out of the box.
from flask import Flask as BaseFlask class Flask(BaseFlask): def run(self, *args, **kwargs): kwargs.setdefault('extra_files', ) kwargs['extra_files'].append('.../data.yml') return super().run(*args, **kwargs) app = Flask(__name__)
I'm not sending a PR for adding the argument, because I'm not sure where to add it (what would make sense the most) and I'm not sure having the argument there is something Elsa should actually support.
I'm playing with a thought that it could be actually smarter - e.g. reading
I'm not sure about