| Age | Commit message (Collapse) | Author |
|
See DEP 0018.
Added:
* MAILERS setting.
* django.core.mail.mailers dict-like EmailBackend factory.
* `using` argument to mail sending APIs.
* `sent_using` attribute to mail.outbox messages in locmem backend.
* MAILERS in startproject settings template, set to console backend.
* AdminLogHandler.using argument.
* BrokenLinkEmailsMiddleware.send_mail() method.
Updated:
* BaseEmailBackend to track the MAILERS alias used to construct it, and
to report errors for unknown kwargs (OPTIONS).
* EmailBackend implementations to initialize from kwargs (OPTIONS) only
when MAILERS is being used.
* smtp.EmailBackend to require `host` option and to default `port`
option based on SSL/TLS options.
* SimpleTestCase setup to substitute the locmem backend for all defined
MAILERS configurations.
* Django's tests that send mail to define MAILERS.
Deprecated:
* EMAIL_BACKEND and other backend-related EMAIL_* settings.
* mail.get_connection().
* The `connection`, `fail_silently`, `auth_user`, and `auth_password`
arguments to mail functions.
* The EmailMessage.connection attribute.
* BaseEmailBackend support for `fail_silently`. Backends that support
fail_silently (SMTP, console, file) now implement it directly.
* AdminEmailHandler.email_backend argument.
Removed undocumented features without deprecation:
* EmailMessage.get_connection() method. (send() now raises an error if a
subclass has attempted to override it.)
* EmailMessage.send() no longer sets self.connection to the connection
used for sending. (It still _uses_ a pre-existing self.connection.)
* AdminEmailHandler.connection() method. (Init now raises an error if a
subclass has attempted to override it.)
Thanks to Natalia Bidart for shepherding DEP 0018 and for extensive
reviews and suggestions on the implementation.
Thanks to Jacob Rief for the initial implementation and multiple
iterations while refining the design.
Co-authored-by: Jacob Rief <jacob.rief@gmail.com>
|
|
|
|
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
|
|
- Updated references to RFC 1123 to RFC 5322
- Only partial as RFC 5322 sort of sub-references RFC 1123.
- Updated references to RFC 2388 to RFC 7578
- Except RFC 2388 Section 5.3 which has no equivalent.
- Updated references to RFC 2396 to RFC 3986
- Updated references to RFC 2616 to RFC 9110
- Updated references to RFC 3066 to RFC 5646
- Updated references to RFC 7230 to RFC 9112
- Updated references to RFC 7231 to RFC 9110
- Updated references to RFC 7232 to RFC 9110
- Updated references to RFC 7234 to RFC 9111
- Tidied up style of text when referring to RFC documents
|
|
client.
Co-authored-by: Kevan Swanberg <kevswanberg@gmail.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
|
|
|
|
to test_utils.
This also removes redundant tests in test_client_regress.
Follow up to 68144f40490b2572c8da4341742b9e387e3f6bdd.
|
|
|
|
Regression in 1e5aa8e1c79252cc810af21294a6e945d11d37b3.
|
|
without a specified trailing slash.
|
|
|
|
|
|
following HTTP 307/308 redirects in test client.
|
|
django.core.exceptions.ValidationError.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
This implements support for asynchronous views, asynchronous tests,
asynchronous middleware, and an asynchronous test client.
|
|
|
|
The smart_str() call (now force_bytes()) added in
e73838b6ddcc7b37c03f9eee04fa6e6a283fedb3 is otherwise untested.
|
|
|
|
|
|
arg is raised.
Also removed usage of the problematic pattern elsewhere.
Regression in 6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba.
|
|
iter(dict) is equivalent to iter(dict.keys()).
|
|
|
|
Thanks Tim Graham for the review.
|
|
|
|
|
|
|
|
Thanks Federico Capoano for finishing the patch.
|
|
|
|
|
|
|
|
|
|
Thanks KevinEtienne for the suggestion.
|
|
This (nearly) completes the work to isolate all the test modules from
each other. This is now more important as importing models from another
module will case PendingDeprecationWarnings if those modules are not in
INSTALLED_APPS. The only remaining obvious dependencies are:
- d.c.auth depends on d.c.admin (because of the is_admin flag to some
views), but this is not so important and d.c.admin is in
always_installed_apps
- test_client_regress depends on test_client. Eventually these should
become a single module, as the split serves no useful purpose.
|
|
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
|
All request methods of ``django.test.client.Client`` receive a ``secure``
argument that defaults to ``False`` indicating whether or not to make the
request through https.
Thanks Aymeric Augustin for the review.
|
|
|
|
|
|
redirect's response.
Thanks mjtamlyn for the suggestion.
|
|
|
|
Thank-you Martin Green for the patch.
|
|
|
|
|