You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently required settings are checked inside settings.py. While this does a great job of enforcing the presence of environment settings, there are two additional ways to load settings.
It would be setting to move the checks for required settings to factory.py after all three settings types have been loaded.
Certain settings are going to be required for the application to run.
Currently `SECRET_KEY` is the only one, but the list will most likely
grow over time. The application factory allows for the settings in
`settings.py` to be overridden a couple of different ways. Required
settings should be checked after all of the overrides have been
processed.
This is being implemented in the form of a helper function that checks
for the required keys. Because `settings.py` will add the key to the
configuration, `DOES_NOT_EXIST` is a value that can be assigned to a key
that is intended to be required. `check_required_settings` will respect
both the absence of the key and the value `DOES_NOT_EXIST`.
Along with this change comes some tests. These two tests are the
groundwork for the eventual suite of tests. `tox` can be used to run the
tests. `tox` requires a `setup.py` in order to install the package into
the virtualenv, so a minimal one is being added for that purpose.
Fixes#32
Certain settings are going to be required for the application to run.
Currently `SECRET_KEY` is the only one, but the list will most likely
grow over time. The application factory allows for the settings in
`settings.py` to be overridden a couple of different ways. Required
settings should be checked after all of the overrides have been
processed.
This is being implemented in the form of a helper function that checks
for the required keys. Because `settings.py` will add the key to the
configuration, `DOES_NOT_EXIST` is a value that can be assigned to a key
that is intended to be required. `check_required_settings` will respect
both the absence of the key and the value `DOES_NOT_EXIST`.
Along with this change comes some tests. These two tests are the
groundwork for the eventual suite of tests. `tox` can be used to run the
tests. `tox` requires a `setup.py` in order to install the package into
the virtualenv, so a minimal one is being added for that purpose.
Fixes#32
Currently required settings are checked inside
settings.py
. While this does a great job of enforcing the presence of environment settings, there are two additional ways to load settings.It would be setting to move the checks for required settings to
factory.py
after all three settings types have been loaded.Something along the lines of
The function definition belongs in
utils.py
.The text was updated successfully, but these errors were encountered: