-
Notifications
You must be signed in to change notification settings - Fork 11
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
Django 1.8 Depreciation Warnings #34
Comments
Excellent. Thanks for catching this. The hardest part I can imagine is making it work the current way for Django < 1.8 projects. Should likely just be checking for either place or possibly checking the Django version to make the decision. Will also need to update the docs appropriately |
One option is to just check for the global debug variable and not bother with the separate template debug variable. I know at least one other debugging tool uses that approach. I'm not 100% sure without checking some code, but I think the check for enabled/disabled, could be as simple as It that way wont let you run the template debug with 'production mode', but its a very easy step forward. I think a more "proper solution" would use the TEMPLATE dictionary in some way, but I'm yet to see anyone set the equivalent of TEMPLATE_DEBUG using the new TEMPLATE dictionary, so I'm not sure if it will be happy with just adding new random variables to it. |
Thanks for thinking this through a bit. Agreed. Originally, I liked checking both because I really want to ensure folks intend to have it on when it is. In other words, this tool is pretty harmless except in the case where someone accidentally has it toggled on in production. TEMPLATE_DEBUG originally has a bit of a different meaning. When enabled, I believe it shows things like undefined variables and other template errors that can silently fail. It seems appropriate to me to just move to checking only on the DEBUG variable. The DEBUG value captures the intentions well enough for me. I'll try to get to this soon if I can. If not, a pull request implementing this would be greatly appreciated |
Fixing it shouldn't be too hard. Just need to either rename the variable, or work out the correct way to move the setting into the TEMPLATE dict.
The text was updated successfully, but these errors were encountered: