diff --git a/README.rst b/README.rst index 4657d36..1e2acc5 100644 --- a/README.rst +++ b/README.rst @@ -61,6 +61,13 @@ plural text, so both are marked as used if the tag is used. Changes ~~~~~~~ +v1.4.2 --- 2017-01-30 +--------------------- + +Fixes another instance of `issue 32`_, which was the result of an initialization order problem. + +.. _issue 32: https://github.com/nedbat/django_coverage_plugin/issues/32 + v1.4.1 --- 2017-01-25 --------------------- diff --git a/django_coverage_plugin/plugin.py b/django_coverage_plugin/plugin.py index f91db03..a7e4ca2 100644 --- a/django_coverage_plugin/plugin.py +++ b/django_coverage_plugin/plugin.py @@ -54,6 +54,12 @@ def check_debug(): # into template engines, so we don't need to depend on settings values # directly and can look at the resulting configured objects + # I _think_ this check is all that's needed and the 3 "hasattr" checks + # below can be removed, but it's not clear how to verify that + from django.apps import apps + if not apps.ready: + return False + # django.template.backends.django gets loaded lazily, so return false # until they've been loaded if not hasattr(django.template, "backends"): diff --git a/setup.py b/setup.py index e0f53c3..fa41211 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ setup( name='django_coverage_plugin', - version='1.4.1', + version='1.4.2', description='Django template coverage.py plugin', author='Ned Batchelder', author_email='ned@nedbatchelder.com',