Formatting
This commit is contained in:
parent
4a385bde6b
commit
befc7ad2cd
28 changed files with 253 additions and 311 deletions
|
@ -1,8 +1,9 @@
|
|||
import importlib
|
||||
|
||||
|
||||
def _declare_backend(backend_path):
|
||||
backend_path = backend_path.split('.')
|
||||
backend_module_name = '.'.join(backend_path[:-1])
|
||||
backend_path = backend_path.split(".")
|
||||
backend_module_name = ".".join(backend_path[:-1])
|
||||
class_name = backend_path[-1]
|
||||
|
||||
def backend(*args, headers={}, from_address=None, **kwargs):
|
||||
|
@ -17,9 +18,10 @@ def _declare_backend(backend_path):
|
|||
_backend.from_address = from_address
|
||||
_backend.headers = headers
|
||||
return _backend
|
||||
|
||||
return backend
|
||||
|
||||
|
||||
smtp_backend = _declare_backend('django.core.mail.backends.smtp.EmailBackend')
|
||||
console_backend = _declare_backend('django.core.mail.backends.console.EmailBackend')
|
||||
locmem_backend = _declare_backend('django.core.mail.backends.locmem.EmailBackend')
|
||||
smtp_backend = _declare_backend("django.core.mail.backends.smtp.EmailBackend")
|
||||
console_backend = _declare_backend("django.core.mail.backends.console.EmailBackend")
|
||||
locmem_backend = _declare_backend("django.core.mail.backends.locmem.EmailBackend")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue