Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
Enhance settings loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ymyzk committed Jun 24, 2015
1 parent ef454c6 commit 984b47d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions channels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
from __future__ import unicode_literals
import sys

from django.conf import settings


CHANNELS = settings.CHANNELS["CHANNELS"]


def _load_module(name):
__import__(name)
Expand All @@ -27,6 +22,8 @@ def send(message, fail_silently=False, options=None):
:type fail_silently: bool
:type options: dict
"""
for klass, config in CHANNELS.items():
from django.conf import settings

for klass, config in settings.CHANNELS["CHANNELS"].items():
channel = _load_backend(klass)(**config)
channel.send(message, fail_silently=fail_silently, options=options)

0 comments on commit 984b47d

Please sign in to comment.