mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Rename EmailBackends for Django consistency
* **Future breaking change:** Rename all Anymail backends to just `EmailBackend`, matching Django's naming convention. (E.g., switch to "anymail.backends.mailgun.EmailBackend" rather than "anymail.backends.mailgun.MailgunBackend".) The old names still work, but will issue a DeprecationWarning and will be removed in some future release. (Apologies for this change; the old naming convention was a holdover from Djrill, and I wanted consistency with other Django EmailBackends before hitting 1.0.) Fixes #49.
This commit is contained in:
@@ -190,9 +190,12 @@ class AnymailBaseBackend(BaseEmailBackend):
|
||||
"""
|
||||
Read-only name of the ESP for this backend.
|
||||
|
||||
(E.g., MailgunBackend will return "Mailgun")
|
||||
Concrete backends must override with class attr. E.g.:
|
||||
esp_name = "Postmark"
|
||||
esp_name = "SendGrid" # (use ESP's preferred capitalization)
|
||||
"""
|
||||
return self.__class__.__name__.replace("Backend", "")
|
||||
raise NotImplementedError("%s.%s must declare esp_name class attr" %
|
||||
(self.__class__.__module__, self.__class__.__name__))
|
||||
|
||||
|
||||
class BasePayload(object):
|
||||
|
||||
Reference in New Issue
Block a user