- Flask Framework Cookbook(Second Edition)
- Shalabh Aggarwal
- 51字
- 2021-06-24 13:57:57
How it works...
Now we can use any of the preceding classes while loading the application's configuration via from_object(). Let's say that we save the preceding class-based configuration in a file named configuration.py, as follows:
app.config.from_object('configuration.DevelopmentConfig')
Overall, this makes the management of configurations for different deployment environments more flexible and easy.