-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many settings as defined in settings.py do not respect the documented environment variables #2578
Comments
This one can't easily be set as an environment variable because it's a "magic" setting that is interpreted. The magic variable is processed inside of # If metrics are enabled and postgres is the backend, set the driver to the
# one provided by django-prometheus.
if settings.METRICS_ENABLED and "postgres" in settings.DATABASES["default"]["ENGINE"]:
settings.DATABASES["default"]["ENGINE"] = "django_prometheus.db.backends.postgresql" I would rather us eliminate this setting entirely in exchange for just having users explicitly set the metrics backend by just setting this in DATABASES["default"]["ENGINE"] = "django_prometheus.db.backends.postgresql" Obviously, this latter approach would require revising our documentation on enabling metrics. |
…ttings.py`, remove `nautobot_config.append.py`, etc. (#2664) * WIP fix for #2578 * Multiple updates: - Move logging defaults to settings.py for consistency between virtualenv and Docker deployments - Remove docker/nautobot_config.append.py as no longer needed to customize Docker - Simplify development/nautobot_config.py - Simplify nautobot/core/tests/nautobot_config.py - Update documentation - Add documentation about django-cryptography bug while I'm touching related docs * Fix logging defaults for DEBUG=True case * flake8 * Update logging info * Update template to better match documentation * Change fragments
Environment
Steps to Reproduce
nautobot_config.py
, rather than one containing all optional settings like thenautobot/core/templates/nautobot_config.py.j2
template does.NAUTOBOT_DEBUG=True
Expected Behavior
Environment variables should be respected as documented.
Observed Behavior
Many environment variables are not respected by the defaults defined in
settings.py
, only the overrides for these settings innautobot_config.py.j2
respect environment variables. Related: #2574. The below list may not be comprehensive:Solution should probably be to just strip down
nautobot_config.py.j2
and move the environment variable checks directly intosettings.py
.This also relates to #1150.
The text was updated successfully, but these errors were encountered: