nedbat/django_coverage_plugin

template debug should default to DEBUG

knyghty opened this issue · 4 comments

Per docs it should default to DEBUG. I'm not sure if this is django's fault that it isn't explicitly set somehow, or the plugin's fault that it assumes False.

In any case, if I'm not mistaken, it can be fixed by changing:
if not template_settings.get('OPTIONS', {}).get('debug', False)
to:
if not template_settings.get('OPTIONS', {}).get('debug', settings.DEBUG)

If DEBUG happens to not be in the user's settings file, settings.DEBUG defaults to False, which seems sensible to me.

@knyghty Please retry with plugin version 1.4. The plugin now lets Django parse the settings and just checks the result for DJ versions 1.8+

@knyghty I hope that the latest version (1.4.1) addresses your issue. If there are no problems reported by Feb 1st, we'll consider this issue closed.

@PamelaM, I'm not able to test this at the moment but looking at your fix it looks like it should fix the problem, so please go ahead and close it now if you like.

Thanks