Closed cmutel closed 6 months ago
DEBUG is for django internal debugging features like showing full tracebacks in the browser. LOCAL is to enable (or notify about it) the local dev server (to use 'http' url prefix instead of 'https' when we can't get it from the request object, or to enable assets preprocessing using django filters). DEV is for our (my, probably) own debugging options. Sometimes they could be used separately.
I see your changes in PR #67 and for me: (1) those things were supposed to work differently, (2) it became a bit more complex than was before.
We never allow DEBUG
or LOCAL
on production, so these can be the same. We are either doing development or not. I guess DEV
is different?
USE_DJANGO_PREPROCESSORS = DEV
- Do we actually need DEV
then? Can't we test for USE_DJANGO_PREPROCESSORS
?
DEV should be turned off in production too (normally). But sometimes (in complex cases) it'd be useful to switch some of them in the 'on' state. But, 'course, it's not essential: probably we won't face such cases at all (I hope that).
USE_DJANGO_PREPROCESSORS = DEV
- Do we actually needDEV
then? Can't we test forUSE_DJANGO_PREPROCESSORS
?
It is useful to keep this parameter independent from DEV
and/or DEBUG
(they have different purposes): you probably don't want to switch on preprocessor mode on when you trying to trace a bug in the code.
It is useful to keep this parameter independent from DEV and/or DEBUG
But it wasn't independent in the codebase? It was aliased directly to LOCAL
. There were exactly the same thing. And if you run into a bug, it's the same time to change the settings.py
file as it is you .env
file (or whatever).
Is that finished?
@lilliputten Why do we need
DEV
,LOCAL
, andDEBUG
? Can't we just use one of these?