summaryrefslogtreecommitdiff
path: root/django/views/decorators
AgeCommit message (Collapse)Author
2026-01-31Refs #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-28Fixed #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-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-23Removed double spaces after periods and within phrases.Sarah Boyce
2025-02-18Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc.Mariusz Felisiak
datetime.UTC was added in Python 3.11.
2024-02-17Fixed #35187 -- Fixed @sensitive_variables/sensitive_post_parameters ↵Mariusz Felisiak
decorators crash with .pyc-only builds. Thanks Jon Janzen for the implementation idea. Thanks Marcus Hoffmann for the report. Regression in 38e391e95fe5258bc6d2467332dc9cd44ce6ba52.
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-07-10Refs #31949 -- Made @vary_on_(cookie/headers) decorators work with async ↵Ben Lomax
functions.
2023-07-10Made @vary_on_cookie decorator reuse @vary_on_headers.Mariusz Felisiak
2023-07-10Refs #31949 -- Made @csrf_exempt decorator to work with async functions.Ben Lomax
2023-06-26Refs #31949 -- Made http decorators to work with async functions.th3nn3ss
2023-06-23Refs #31949 -- Simplified @sensitive_variables a bit.Jon Janzen
Follow up to 38e391e95fe5258bc6d2467332dc9cd44ce6ba52.
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-05-26Optimized @condition decorator a bit.Mariusz Felisiak
This removes unnecessary get_last_modified() hook.
2023-05-23Refs #31949 -- Made @no_append_slash decorator to work with async functions.Ben Lomax
2023-05-20Refs #31949 -- Made @xframe_options_(deny/sameorigin/exempt) decorators to ↵Ben Lomax
work with async functions.
2023-04-25Refs #31949 -- Made @never_cache and @cache_control() decorators to work ↵Ben Lomax
with async functions. Thanks Carlton Gibson and Mariusz Felisiak for reviews.
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-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
2022-05-25Normalized decorator style for functools.wraps.Aymeric Augustin
2022-05-25Normalized imports of functools.wraps.Aymeric Augustin
@wraps is 10 times more common than @functools.wraps. Standardize to the most common version.
2022-05-25Renamed 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-03-24Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson
Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-12-16Fixed #33350 -- Reallowed using cache decorators with duck-typed HttpRequest.Mariusz Felisiak
Regression in 3fd82a62415e748002435e7bad06b5017507777c. Thanks Terence Honles for the report.
2021-06-25Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using ↵Mateo Radman
"assert" in various code.
2021-05-12Fixed #32366 -- Updated datetime module usage to recommended approach.Nick Pope
- Replaced datetime.utcnow() with datetime.now(). - Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp(). - Replaced datetime.utctimetuple() with datetime.timetuple(). - Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
2021-02-24Refs #32468 -- Added error message on invalid usage of cache decorators.Haki Benita
2020-10-22Fixed #32124 -- Added per-view opt-out for APPEND_SLASH behavior.Carlton Gibson
2020-09-14Fixed #31789 -- Added a new headers interface to HttpResponse.Tom Carrick
2020-01-16Fixed #30765 -- Made cache_page decorator take precedence over max-age ↵Flavio Curella
Cache-Control directive.
2019-12-10Fixed #31077 -- Made debug decorators raise TypeError if they're not called.Baptiste Mispelon
Django will raise an error if you forget to call the decorator.
2018-05-04Fixed #26688 -- Fixed HTTP request logging inconsistencies.Samir Shah
* Added logging of 500 responses for instantiated responses. * Added logging of all 4xx and 5xx responses.
2017-11-14Fixed #28795 -- Removed 'not in' checks and used dict.setdefault().Дилян Палаузов
2017-06-06Fixed #28104 -- Prevented condition decorator from setting ↵Josh Schneier
ETag/Last-Modified headers for non-safe requests.
2017-03-03Refs #27656 -- Updated django.views docstring verbs according to PEP 257.Anton Samarchyan
2017-02-01Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.Vytis Banaitis
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-21Refs #23919 -- Removed django.utils.decorators.available_attrs() usage.Tim Graham
It's only needed to workaround a bug on Python 2.
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-09-10Fixed #27083 -- Added support for weak ETags.Kevin Christopher Henry
2016-09-09Normalized spelling of ETag.Tim Graham
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2015-12-31Removed British/Austrialian word: whilist.Tim Graham
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-08-15Fixed #24935 -- Refactored common conditional GET handling.Denis Cornehl
2015-05-25Fixed typos in HTTP decorator docs.I am Clinton
2015-05-13Removed unnecessary arguments in .get method callsPiotr Jakimiak
2015-02-06Sorted imports with isort; refs #23860.Tim Graham