summaryrefslogtreecommitdiff
path: root/tests/view_tests
AgeCommit message (Collapse)Author
14 daysRefs #34118 -- Removed further asgiref coroutine detection shims in tests.Jacob Walls
Follow-up to 4a52533329a03207c1c4592a13fbb12b9ec5ef9e.
2026-05-24Removed hardcoded Site pks.Tim Graham
2026-05-18Fixed #36825 -- Extended admin templates so CSP nonce is included if available.Johannes Maron
Error pages, admin, and registration templates were updated to use `{% csp_nonce %}` on their explicit `<script>`, `<link>`, and `<style>` HTML elements. Co-authored-by: Antoliny0919 <antoliny0919@gmail.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2026-05-13Fixed #35514 -- Implemented dictionary-based MAILERS.Mike Edmunds
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>
2025-09-26Refs #28526 -- Provided URLResolver namespace in technical 404 template.Jacob Walls
This avoids looking up the nonexistent "name" attribute on URLResolver, which logs verbosely.
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-07-18Fixed #36456 -- Improved content type negotiation in technical 500 error ↵IsJn-227
response.
2025-03-21Fixed #36138 -- Changed ADMINS and MANAGERS settings to lists of strings.Mike Edmunds
Previously, the ADMINS and MANAGERS settings were lists of (name, address) tuples (where the name had been unused). Deprecated use of tuples. Updated settings value sanity checks, and changed from ValueError to ImproperlyConfigured.
2025-01-20Fixed #36005 -- Dropped support for Python 3.10 and 3.11.Mariusz Felisiak
2025-01-17Fixed invalid HTML in test templates.Thibaut Decombe
2024-10-16Refs #35727 -- Updated response.content.decode calls to use the ↵SaJH
HttpResponse.text property. Signed-off-by: SaJH <wogur981208@gmail.com>
2024-08-23Fixed #35703 -- Made technical_404_response() respect SCRIPT_NAME to return ↵Maarten Breddels
default_urlconf().
2024-08-01Fixed #35646 -- Extended SafeExceptionReporterFilter.hidden_settings to ↵Markus Holtermann
treat `AUTH` as a sensitive match. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-08-01Improved view_tests.tests.test_debug.ExceptionReporterFilterTests.Natalia
2024-06-20Fixed #35537 -- Changed EmailMessage.attachments and ↵Jake Howard
EmailMultiAlternatives.alternatives to use namedtuples. This makes it more descriptive to pull out the named fields.
2024-05-21Removed hardcoded docs version in csrf template.Ryan Hiebert
2024-04-12Fixed #35364 -- Stopped AdminEmailHandler rendering email unnecessarily.Adam Johnson
2024-01-31Fixed #35143 -- Improved accessibility of 404/500 debug pages.Marijke Luttekes
This: - changes the header, main, and footer content areas to be rendered in a <header>, <main>, and <footer> tags, - adds scope attributes to <th>, - uses <code> for a patterns list, - uses <small> instead of <span>.
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-12-31Used addCleanup() in tests where appropriate.Mariusz Felisiak
2023-12-04Fixed #34830 -- Added request to bad_request/csrf_failure view template ↵yushanfans2233
contexts.
2023-11-08Reverted "Fixed #34830 -- Added request to csrf_failure view's template ↵Natalia
context." This reverts commit 535f7b5c6cea54a0796d85bbe213183d50002689.
2023-11-07Fixed #34830 -- Added request to csrf_failure view's template context.Prakhar
Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
2023-06-23Refs #31949 -- Made @sensitive_variables/sensitive_post_parameters ↵Jon Janzen
decorators to work with async functions. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-03-30Reverted "Refs #31949 -- Enabled @sensitive_variables to work with async ↵Mariusz Felisiak
functions." This reverts commits 23cbed21876bf02f4600c0dac3a5277db5b2afbb and 203a15cadbf8d03b51df1b28d89b2e7ab4264973.
2023-03-22Refs #31949 -- Enabled @sensitive_variables to work with async functions.Jon Janzen
2023-02-17Refs #34342 -- Added tests for handling sync streaming responses by test client.Alexandre Spaeth
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2023-02-17Fixed #34343 -- Moved built-in templates to filesystem.Nick Pope
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2023-01-04Refs #34074 -- Used headers argument for RequestFactory and Client in docs ↵David Wobrock
and tests.
2022-11-29Fixed #33701 -- Added fine-grained error locations to the technical 500 ↵Giebisch
debug page.
2022-11-25Fixed #33747 -- Added exception notes to the technical 500 debug page.Giebisch
2022-11-10Updated documentation and comments for RFC updates.Nick Pope
- 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
2022-10-26Fixed #33606 -- Cleansed sessionid cookie in error reports.Tobias Bengfort
Co-authored-by: Simon Charette <charette.s@gmail.com>
2022-07-25Fixed #33863 -- Fixed JavaScriptCatalog with more than 1 level of fallback ↵Claude Paroz
translations. Co-authored-by: Carlos Mermingas <cmermingas@gmail.com>
2022-03-11Fixed #33571 -- Fixed static serving views crash when If-Modified-Since is ↵Collin Anderson
empty. Regression in d6aff369ad33457ae2355b5b210faf1c4890ff35.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-02-07Refs #33476 -- Changed quotation marks in ↵Mariusz Felisiak
DebugViewTests.test_template_exceptions(). This prevents a failure after reformatting the code with Black.
2022-02-03Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak
In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
2022-02-01Fixed #30360 -- Added support for secret key rotation.tschilling
Thanks Florian Apolloner for the implementation idea. Co-authored-by: Andreas Pelme <andreas@pelme.se> Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Co-authored-by: Vuyisile Ndlovu <terrameijar@gmail.com>
2022-01-28Fixed #33461 -- Escaped template errors in the technical 500 debug page.Keryn Knight
2022-01-13Fixed #33396 -- Added view name to technical 500 debug page.Hrushikesh Vaidya
2022-01-08Fixed #33425 -- Fixed view name for CBVs on technical 404 debug page.Keryn Knight
Regression in 0c0b87725bbcffca3bc3a7a2c649995695a5ae3b.
2021-10-21Fixed #33211 -- Updated tests for Selenium 4.0.0.Carlton Gibson
Replaced deprecated `find_element[s]_by_*()` usages, in favour of `find_element[s]()` with an explicit `By`.
2021-10-20Refs #32956 -- Capitalized HTTP/HTTPS in comments, docs, and docstrings.David Smith
2021-09-14Fixed #32873 -- Deprecated settings.USE_L10N.Claude Paroz
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-29Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵David Smith
appropriate.
2021-06-25Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using ↵Mateo Radman
"assert" in various code.
2021-04-30Fixed #32698 -- Moved HttpRequest.get_raw_uri() to ↵Hasan Ramezani
ExceptionReporter._get_raw_insecure_uri().