Skip to content

Commit 6026235

Browse files
committed
Fix compatibility with Django < 1.8
The 1.6.1 release added a dependency on the `setting_changed` signal. In Django releases prior to 1.8, this signal is located in the `django.test.signals` module, and in 1.8, an alias was added in `django.core.signals`. This change adds a fallback import to restore compatibility with older versions for applications which cannot (yet) migrate to the newer Djangos. It has been tested against Django 1.6.11 and 1.8.9.
1 parent 9ca6cbe commit 6026235

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pipeline/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
import shlex
66

77
from django.conf import settings as _settings
8-
from django.core.signals import setting_changed
8+
try:
9+
from django.core.signals import setting_changed
10+
except ImportError:
11+
# Django < 1.8
12+
from django.test.signals import setting_changed
913
from django.dispatch import receiver
1014
from django.utils.six import string_types
1115

0 commit comments

Comments
 (0)