MCPcopy
hub / github.com/django/django / __init__

Method __init__

django/utils/log.py:88–120  ·  view source on GitHub ↗
(
        self, include_html=False, email_backend=None, reporter_class=None, using=None
    )

Source from the content-addressed store, hash-verified

86 """
87
88 def __init__(
89 self, include_html=False, email_backend=None, reporter_class=None, using=None
90 ):
91 super().__init__()
92
93 # RemovedInDjango70Warning: email_backend arg and connection error.
94 if email_backend:
95 if using:
96 raise ImproperlyConfigured(
97 "The 'email_backend' argument is not compatible with 'using'."
98 )
99 if mail.mailers._is_configured:
100 raise ImproperlyConfigured(
101 "The 'email_backend' argument is not valid when "
102 "settings.MAILERS is defined."
103 )
104 warnings.warn(
105 "The 'email_backend' argument is deprecated. Use 'using' instead.",
106 RemovedInDjango70Warning,
107 skip_file_prefixes=django_file_prefixes(),
108 )
109 if hasattr(self, "connection"):
110 raise AttributeError(
111 "The undocumented AdminEmailHandler.connection() method is no longer "
112 "used."
113 )
114
115 self.include_html = include_html
116 self.email_backend = email_backend
117 self.using = using
118 self.reporter_class = import_string(
119 reporter_class or settings.DEFAULT_EXCEPTION_REPORTER
120 )
121
122 def emit(self, record):
123 # Early return when no email will be sent.

Callers

nothing calls this directly

Calls 4

django_file_prefixesFunction · 0.90
import_stringFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected