Skip to content

Commit

Permalink
Fix compatibility with Django < 1.8
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davidt committed Feb 9, 2016
1 parent 9ca6cbe commit 6026235
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pipeline/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
import shlex

from django.conf import settings as _settings
from django.core.signals import setting_changed
try:
from django.core.signals import setting_changed
except ImportError:
# Django < 1.8
from django.test.signals import setting_changed
from django.dispatch import receiver
from django.utils.six import string_types

Expand Down

0 comments on commit 6026235

Please sign in to comment.