Skip to content

Commit f085125

Browse files
authored
Merge pull request #38 from PamelaM/pm/fix_dj110_startup_issues
Fix DJ check_debug issue with DJ1.10
2 parents 9f62f0a + 9493963 commit f085125

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ plural text, so both are marked as used if the tag is used.
6161
Changes
6262
~~~~~~~
6363

64+
v1.4.2 --- 2017-01-30
65+
---------------------
66+
67+
Fixes another instance of `issue 32`_, which was the result of an initialization order problem.
68+
69+
.. _issue 32: https://github.com/nedbat/django_coverage_plugin/issues/32
70+
6471

6572
v1.4.1 --- 2017-01-25
6673
---------------------

django_coverage_plugin/plugin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ def check_debug():
5454
# into template engines, so we don't need to depend on settings values
5555
# directly and can look at the resulting configured objects
5656

57+
# I _think_ this check is all that's needed and the 3 "hasattr" checks
58+
# below can be removed, but it's not clear how to verify that
59+
from django.apps import apps
60+
if not apps.ready:
61+
return False
62+
5763
# django.template.backends.django gets loaded lazily, so return false
5864
# until they've been loaded
5965
if not hasattr(django.template, "backends"):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
setup(
2424
name='django_coverage_plugin',
25-
version='1.4.1',
25+
version='1.4.2',
2626
description='Django template coverage.py plugin',
2727
author='Ned Batchelder',
2828
author_email='[email protected]',

0 commit comments

Comments
 (0)