-
Notifications
You must be signed in to change notification settings - Fork 36
Add note about template debug setting to README #72
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,20 @@ the plugin to identify untested templates. | |
| If you get a :code:`django.core.exceptions.ImproperlyConfigured` error, | ||
| you need to set the :code:`DJANGO_SETTINGS_MODULE` environment variable. | ||
|
|
||
| If you get :code:`django_coverage_plugin.plugin.DjangoTemplatePluginException: Template debugging must be enabled in settings`, change your TEMPLATES setting: | ||
|
|
||
| .. code-block:: python | ||
| DEBUG = True | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my local testing this top-level Django Given it is preferable to run tests in an as-close-to-prod-as-possible configuration, perhaps remove this line & set |
||
| TEMPLATES = [ | ||
| { | ||
| ... | ||
| 'OPTIONS': { | ||
| 'debug': DEBUG, | ||
| }, | ||
| }, | ||
| ] | ||
| Configuration | ||
| ~~~~~~~~~~~~~ | ||
|
|
||
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.
It seems that when using pytest, the check which can raise this exception doesn't actually run properly (#73) so it might help to mention here "...or if you are using pytest and getting 0% coverage (issue #73)"
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.
As of coveragepy/coveragepy@30c023b, the check is now a real Python warning, so pytest will display it.