-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug enabled in production #24
Comments
Good point. Hopefully someone using this is advanced enough to know to already do that. Want to submit a PR? |
I think it's good idea to check weather DEBUG should be enabled with environment variables. |
yes. can you please grab it. thanks! |
Thank you. Wow, I've delved into a code, and it's already done :) |
Hi! I've looked into YAML spec and found there're lots of ways to set "True" value for a bool variable. So it's likely somebody'll want to use another legal variant, or try to change a case. |
Hi,
I just noticed that, with the current setup, debug mode is enabled in production. More specifically:
https://github.com/realpython/dockerizing-django/blob/master/web/docker_django/settings.py#L26
should probably be something like
DEBUG = True if os.getenv('DEBUG') == 'True' else False
. I use this in my own setup and I prefer the default to beFalse
to avoid accidentally enabling debug mode (e.g. if the setting is forgotten in.env
).I know this is only an example, but I think it's better to show people best practices :-)
The text was updated successfully, but these errors were encountered: