-
Notifications
You must be signed in to change notification settings - Fork 36
Fixes to check_debug and adds support for Django 1.10 (the issues were heavily intertwined) #30
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
Conversation
For DJ versions 1.8+
if template_settings['BACKEND'] != 'django.template.backends.django.DjangoTemplates': | ||
raise DjangoTemplatePluginException("Can't use non-Django templates.") | ||
if not template_settings.get('OPTIONS', {}).get('debug', False): | ||
if not settings.configured: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's how we defer check_debug until settings are configured. Note that we can't really encounter the case where we'd be tracing a template until after settings have been configured because the template can't be run without configured settings.
@PamelaM !! Wow. Let me know when you are done with commits. Finding me on IRC or Slack would be cool too :) |
Addresses a few issues:
django.template.backends.django.DjangoTemplates
at top-levelplugin_test.py
to avoid it getting reloaded.tox check
failuresNot sure how to test that settings.py gets coverage in the current environment. I'm looking into creating a test_project that can be used for integration tests.