Skip to content

Commit 3b7972f

Browse files
committed
doc: explain more about the TEMPLATES.OPTIONS.debug setting
1 parent a66dcfb commit 3b7972f

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Django Template Coverage.py Plugin
2626

2727
A `coverage.py`_ plugin to measure test coverage of Django templates.
2828

29-
Supported Python versions: 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8.
29+
Supported Python versions: 2.7, 3.6, 3.7, 3.8 and 3.9.
3030

31-
Supported Django versions: 1.8, 1.11, 2.0, 2.1, 2.2 and 3.0.
31+
Supported Django versions: 1.8, 1.11, 2.x and 3.x.
3232

33-
Supported coverage.py version 4.x or 5.x.
33+
Supported coverage.py versions: 4.x or higher.
3434

3535
The plugin is pip installable::
3636

@@ -39,8 +39,7 @@ The plugin is pip installable::
3939
To run it, add this setting to your ``.coveragerc`` file::
4040

4141
[run]
42-
plugins =
43-
django_coverage_plugin
42+
plugins = django_coverage_plugin
4443

4544
Then run your tests under `coverage.py`_.
4645

@@ -51,21 +50,24 @@ the plugin to identify untested templates.
5150
If you get a :code:`django.core.exceptions.ImproperlyConfigured` error,
5251
you need to set the :code:`DJANGO_SETTINGS_MODULE` environment variable.
5352

54-
If you get :code:`django_coverage_plugin.plugin.DjangoTemplatePluginException: Template debugging must be enabled in settings`, change your TEMPLATES setting:
53+
Template coverage only works if your Django templates have debugging enabled.
54+
If you get :code:`django_coverage_plugin.plugin.DjangoTemplatePluginException:
55+
Template debugging must be enabled in settings`, or if no templates get
56+
measured, make sure you have :code:`TEMPLATES.OPTIONS.debug` set to True in
57+
your settings file:
5558

5659
.. code-block:: python
5760
58-
DEBUG = True
59-
6061
TEMPLATES = [
6162
{
6263
...
6364
'OPTIONS': {
64-
'debug': DEBUG,
65+
'debug': True,
6566
},
6667
},
6768
]
6869
70+
6971
Configuration
7072
~~~~~~~~~~~~~
7173

0 commit comments

Comments
 (0)