Production injected the right database variables under the wrong names
My production database settings expected environment variables with a CPANEL_ prefix. The deployment supplied variables named DB_NAME, DB_USER, and DB_PASSWORD.
The values could be present in the process environment while the settings model still reported missing inputs. The code and the deployment disagreed about the names.

Illustration: a parcel and a destination with different labels.
The December 27 fix changes the production settings prefix:
- model_config = SettingsConfigDict(env_prefix="CPANEL_")
+ model_config = SettingsConfigDict(env_prefix="")
That is a configuration contract change. It doesn’t alter the database password or create a new database. It tells the settings loader where to look for the values already being supplied.
Follow one field through startup
The model has a field named DB_NAME. With the old production prefix, its environment lookup uses CPANEL_DB_NAME. Without that prefix, it uses DB_NAME.
I don’t need real connection details to demonstrate the mismatch:
| Dummy environment | Old production lookup | Revised production lookup |
|---|---|---|
Only DB_NAME, DB_USER, DB_PASSWORD | Required prefixed inputs missing. | Reads the standard names. |
Only CPANEL_DB_NAME, CPANEL_DB_USER, CPANEL_DB_PASSWORD | Reads prefixed names. | Required standard inputs missing. |
| Both sets, with different values | Uses the prefixed names. | Uses the standard names. |
The table describes the lookup policy, not a connection test. Correctly loading example_db wouldn’t establish that such a database exists or that the supplied user can access it.
The test environment had to change too
The production test fixture previously supplied the prefixed names. A test built that way could agree perfectly with the settings model while failing to represent the deployment environment.
The patch changes the fixture to supply the standard names and adds explicit tests for the new contract. One supplies both sets with different dummy values and checks that the standard names win. Another supplies only prefixed names and expects validation to fail.
That second case prevents a test from passing simply because some leftover variable happens to make startup work. The expected names need to be the ones the application actually requires.
The URL-construction test also clears the cached settings functions before reading its test environment. Otherwise, a previous settings object could make a later environment change appear to have no effect.
Configuration needs a caller
Production settings aren’t correct in isolation. The process that launches the application has to supply the same names the application reads.
I had made a production-specific settings subclass, but giving it a hosting-specific prefix created a difference the launcher wasn’t using. Removing that difference aligned the two sides.
The regression checks follow the injected variables into the constructed connection URL. A live database connection still needs a separate check.