Skip to content

Commit

Permalink
Added a default backend for backward compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
brosner committed Jan 7, 2009
1 parent 47b310b commit 1cc80ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion notification/backends/__init__.py
Expand Up @@ -6,9 +6,14 @@


from base import BaseBackend from base import BaseBackend


# mostly for backend compatibility
default_backends = (
("email", "notification.backends.email.EmailBackend"),
)

def load_backends(): def load_backends():
backends = [] backends = []
for bits in getattr(settings, "NOTIFICATION_BACKENDS", tuple()): for bits in getattr(settings, "NOTIFICATION_BACKENDS", default_backends):
if len(bits) == 2: if len(bits) == 2:
label, backend_path = bits label, backend_path = bits
spam_sensitivity = None spam_sensitivity = None
Expand Down

0 comments on commit 1cc80ae

Please sign in to comment.