#35901: settings.DEBUG could reject non-empty string values (or in particular
"off", "no", "0", "disabled", "false", "False")
-----------------------------------+--------------------------------------
Reporter: Sebastian Pipping | Owner: (none)
Type: Uncategorized | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: security debug | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Comment (by Tim Graham):
I'd be inclined to say wontfix unless a consensus can be reached on the
forum. See a [https://forum.djangoproject.com/t/make-the-system-check-
look-at-the-types-of-settings/27424 related thread]. on a proposal to add
a system check to verify the type of all settings. There are often
unintended side effects when we've added checks like this.
Here is [https://dev.to/codereviewdoctor/don-t-abuse-django-s-debug-
setting-1flc#feature-flag-implimentation an interesting approach] (though
perhaps not the best one) I found to help avoid a configuration mistake
with environment variables:
{{{#!python
from ast import literal_eval
from os import getenv
DEBUG = literal_eval(getenv('DEBUG', 'False'))
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35901#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070193188536ed-1c97d26a-a655-4316-b4c9-e1a349d5b778-000000%40eu-central-1.amazonses.com.