| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2026-10-26 | Fixed #37232 -- Added support for the HTTP QUERY method. | Michiel W. Beijen | |
| QUERY (RFC 10008) is a safe, idempotent method that carries the query in the request content rather than in the URI's query component. Treat it as safe throughout: exempt it from CSRF protection, evaluate request preconditions as for GET, accept it in require_safe(), and dispatch it from View. Query content is available as HttpRequest.body and is not parsed into HttpRequest.POST. Caching is left for a follow-up. Per RFC 10008 Section 2.7 the cache key for a QUERY request must incorporate the request content, which the cache middleware and cache_page() don't do, so they continue to ignore QUERY. Thanks Ben Atkinson, Jonathan Biemond, and Jacob Walls for reviews. | |||
| 2026-08-05 | Fixed #37205 -- Asserted exact HttpResponse types in tests. | Jonathan Biemond | |
| assertIsInstance passes when the expected is a superclass of the returned object. Thanks James Bligh for the review! | |||
| 2026-03-09 | Fixed #36293 -- Avoided buffering streaming responses in GZipMiddleware. | farhan | |
| This avoids latency and/or blocking. The example of streaming a CSV file was rewritten to employ batching for greater efficiency in all layers (db, HTTP, etc.). The improved performance from batching should outweigh the drag introduced by an additional byte for each flush. Co-authored-by: huoyinghui <huoyinghui@users.noreply.github.com> | |||
| 2026-01-31 | Refs #34118 -- Removed asgiref coroutine detection shims. | Jacob Walls | |
| As Python 3.12 is now the floor, we can drop the shims and use the `inspect` module. | |||
| 2025-08-28 | Fixed #36532 -- Added Content Security Policy view decorators to override or ↵ | Rob Hudson | |
| disable policies. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> | |||
| 2025-07-23 | Refs #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. | |||
| 2024-08-30 | Fixed #35083 -- Updated method_decorator to handle async methods. | Vaarun Sinha | |
| Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> | |||
| 2023-09-13 | Refs #31949 -- Made make_middleware_decorator to work with async functions. | Ben Lomax | |
| 2023-09-13 | Added more tests for decorators. | Ben Lomax | |
| 2023-07-10 | Refs #31949 -- Made @vary_on_(cookie/headers) decorators work with async ↵ | Ben Lomax | |
| functions. | |||
| 2023-07-10 | Refs #31949 -- Made @csrf_exempt decorator to work with async functions. | Ben Lomax | |
| 2023-06-26 | Refs #31949 -- Made http decorators to work with async functions. | th3nn3ss | |
| 2023-06-26 | Added more tests for http decorators. | th3nn3ss | |
| 2023-06-26 | Moved http decorator tests into decorators/test_http.py. | Mariusz Felisiak | |
| 2023-05-23 | Refs #31949 -- Made @no_append_slash decorator to work with async functions. | Ben Lomax | |
| 2023-05-20 | Refs #31949 -- Made @xframe_options_(deny/sameorigin/exempt) decorators to ↵ | Ben Lomax | |
| work with async functions. | |||
| 2023-05-20 | Moved clickjacking decorator tests into decorators/test_clickjacking.py. | Ben Lomax | |
| This also adds extra assertions. | |||
| 2023-04-25 | Refs #31949 -- Made @never_cache and @cache_control() decorators to work ↵ | Ben Lomax | |
| with async functions. Thanks Carlton Gibson and Mariusz Felisiak for reviews. | |||
| 2023-04-25 | Added more tests for @cache_control decorator. | Ben Lomax | |
| 2023-04-04 | Moved cache decorators tests into decorators/test_cache.py. | Ben Lomax | |
| 2022-05-25 | Normalized decorator style for functools.wraps. | Aymeric Augustin | |
| 2022-05-25 | Renamed wrapped functions to wrapper. | Aymeric Augustin | |
| All these functions are wrapping another function. They're the wrapper, while the function they're wrapping is the wrapped. | |||
| 2022-02-07 | Refs #33476 -- Reformatted code with Black. | django-bot | |
| 2021-12-16 | Fixed #33350 -- Reallowed using cache decorators with duck-typed HttpRequest. | Mariusz Felisiak | |
| Regression in 3fd82a62415e748002435e7bad06b5017507777c. Thanks Terence Honles for the report. | |||
| 2021-12-13 | Refs #33338 -- Added never_cache() tests for Expires header. | mgaligniana | |
| 2021-10-20 | Fixed #33043 -- Made method_decorator() preserve wrapper assignments. | Vinay Karanam | |
| Regression in f434f5b84f7fcea9a76a551621ecce70786e2899. | |||
| 2021-02-24 | Refs #32468 -- Added error message on invalid usage of cache decorators. | Haki Benita | |
| 2020-09-14 | Fixed #31789 -- Added a new headers interface to HttpResponse. | Tom Carrick | |
| 2020-02-18 | Refs #26601 -- Deprecated passing None as get_response arg to middleware ↵ | Claude Paroz | |
| classes. This is the new contract since middleware refactoring in Django 1.10. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> | |||
| 2019-06-26 | Fixed #30594 -- Added 'private' Cache-Control directive to never_cache() ↵ | nsasaki128 | |
| decorator. | |||
| 2018-06-27 | Refs #29253 -- Fixed method_decorator() crash if decorator sets a new attribute. | Chris Jerdonek | |
| Regression in fdc936c9130cf4fb5d59869674b9a31cc79a7999. | |||
| 2018-04-16 | Fixed #29253 -- Made method_decorator(list) copy attributes. | Chris Jerdonek | |
| 2018-04-16 | Updated decorators test to use subTest(). | Chris Jerdonek | |
| 2017-02-03 | Fixed spelling of "nonexistent". | Tim Graham | |
| 2017-01-21 | Refs #23919 -- Removed misc references to Python 2. | Tim Graham | |
| 2017-01-19 | Refs #23919 -- Stopped inheriting from object to define new style classes. | Simon Charette | |
| 2017-01-17 | Refs #20223 -- Removed deprecated django.utils.functional.allow_lazy(). | Tim Graham | |
| 2016-11-14 | Fixed E305 flake8 warnings. | Ramin Farajpour Cami | |
| 2016-11-10 | Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. | za | |
| 2016-06-16 | Fixed #26747 -- Used more specific assertions in the Django test suite. | Jon Dufresne | |
| 2016-06-07 | Fixed #10107 -- Allowed using mark_safe() as a decorator. | Scott Vitale | |
| Thanks ArcTanSusan for the initial patch. | |||
| 2015-12-12 | Fixed #20223 -- Added keep_lazy() as a replacement for allow_lazy(). | Iacopo Spalletti | |
| Thanks to bmispelon and uruz for the initial patch. | |||
| 2015-10-26 | Fixed #25611 -- Standardized descriptor signatures. | Tim Graham | |
| 2015-09-18 | Fixed #25269 -- Allowed method_decorator() to accept a list/tuple of decorators. | fabrizio ettore messina | |
| 2015-08-01 | Fixed #25146 -- Allowed method_decorator() to decorate classes. | Rigel Di Scala | |
| 2015-04-28 | Fixed #13008 -- Added more Cache-Control headers to never_cache() decorator. | Markus Bertheau | |
| 2015-02-06 | Sorted imports with isort; refs #23860. | Tim Graham | |
| 2015-01-17 | Removed django.utils.functional.memoize per deprecation timeline. | Tim Graham | |
| refs #21351. | |||
| 2014-11-29 | Fixed #23923 -- Promoted Django's deprecation warnings to errors in runtests.py | Tim Graham | |
| 2014-02-09 | Fixed #21247 -- Made method_decorator play nicely with descriptors | Marc Tamlyn | |
| When a method decorator was used in conjunction with a decorator implemented as a descriptor, method_decorator did not correctly respect the method binding. Thanks for Graham Dumpleton for the report and initial patch. | |||
