Handle PRODUCTION not being defined.

Review Request #13927 — Created June 3, 2024 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

We introduced the new PRODUCTION setting in order to add a separation
between things which enable debug logging, and things which should
always be enabled (or disabled) in production vs. in the devserver. This
was done because a lot of server admins like to set DEBUG to True if
they're having some issue, and this would often cause their whole system
to break.

In Djblets, we can't guarantee that PRODUCTION will exist in the
settings object. This change makes it so we fall back to the DEBUG
setting if it's not present.

  • Ran unit tests.
  • Tried removing PRODUCTION from settings and saw that these things
    still worked.

Commits

Files