I wanted it to add common app-configuration options such as --config, --loglevel, --logfile, etc. to my flask.cli group and read them from the scriptinfo in my app factory function.
The @script_info_option decorator was apparently removed after 0.11 with a cryptic commit message like "implementing simplified interface".
So... how do I do add app-factory-time configuration options now?
Found out how you do it now:
@click.pass_context so it gets the context as the first argument.ctx.find_root().params to get what was passed to the group.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With