Rather than creating the Flask app module-level across _model.py and _pages.py, use the preferred application factory pattern to instantiate.
This highlighted an issue around how the default timezone is determined. Having CUBEDASH_DEFAULT_TIMEZONE be provided via both an environment variable and the app config seems like overkill, and which version is used - as well as the default value - appears to be inconsistent. Timezone configuration would likely be best revisited and properly reworked in another PR, but for now I suggest having it configurable only via the app config.
Rather than creating the Flask app module-level across
_model.py
and_pages.py
, use the preferred application factory pattern to instantiate. This highlighted an issue around how the default timezone is determined. HavingCUBEDASH_DEFAULT_TIMEZONE
be provided via both an environment variable and the app config seems like overkill, and which version is used - as well as the default value - appears to be inconsistent. Timezone configuration would likely be best revisited and properly reworked in another PR, but for now I suggest having it configurable only via the app config.📚 Documentation preview 📚: https://datacube-explorer--614.org.readthedocs.build/en/614/