settings: don't COMPRESS assets in local envs with DEBUG=1 (no bug)#768
settings: don't COMPRESS assets in local envs with DEBUG=1 (no bug)#768
Conversation
|
View this pull request in Lando to land it once approved. |
zzzeid
left a comment
There was a problem hiding this comment.
lgtm, minus one question.
| } | ||
|
|
||
| COMPRESS_ENABLED = True | ||
| COMPRESS_ENABLED = ENVIRONMENT.is_remote or not DEBUG |
There was a problem hiding this comment.
Why check is_remote here? I think checking DEBUG is sufficient. If someone sets DEBUG to False locally, presumably it is to test some functionality that would mimic production, including how compress would work.
| COMPRESS_ENABLED = ENVIRONMENT.is_remote or not DEBUG | |
| COMPRESS_ENABLED = not DEBUG |
There was a problem hiding this comment.
My concern was more about not using the cache in remote envs. But I got the logic wrong: it should be
| COMPRESS_ENABLED = ENVIRONMENT.is_remote or not DEBUG | |
| COMPRESS_ENABLED = ENVIRONMENT.is_remote and not DEBUG |
Which way do you think we should go?
question on approach with another suggestion to choose from
|
Woops, I clicked the merge button by mistake (as I was inspecting the DOM of the page...) @zzzeid the questions in #768 (comment) are still relevant. I'll create a follow-up PR when we have decided how we want to go. |
This makes the app not use CACHE URLs for assets when working in local
environments in DEBUG mode.