mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Uniform settings handling
For MANDRILL_API_KEY (e.g.,), look for these settings:
* ANYMAIL = { 'MANDRILL_API_KEY': '...' }
* ANYMAIL_MANDRILL_API_KEY = "..."
* MANDRILL_API_KEY = "..."
(the "bare" third version is used only for settings that
might be reasonably shared with other apps, like api keys)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
import json
|
||||
from requests import HTTPError
|
||||
|
||||
@@ -68,10 +67,6 @@ class AnymailError(Exception):
|
||||
return description
|
||||
|
||||
|
||||
class AnymailImproperlyConfigured(AnymailError, ImproperlyConfigured):
|
||||
"""Exception for configuration problems"""
|
||||
|
||||
|
||||
class AnymailAPIError(AnymailError):
|
||||
"""Exception for unsuccessful response from ESP's API."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user