summaryrefslogtreecommitdiff
path: root/django/views
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2023-02-01 07:13:39 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-02-01 11:04:38 +0100
commit097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 (patch)
tree7042be9ee3aabda10ecfa8923a113388b81f34a8 /django/views
parent8c660fb59239828583f17cdede3b64f208b8752c (diff)
Refs #33476 -- Applied Black's 2023 stable style.
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
Diffstat (limited to 'django/views')
-rw-r--r--django/views/decorators/common.py1
-rw-r--r--django/views/decorators/csrf.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/django/views/decorators/common.py b/django/views/decorators/common.py
index fe4d58f591..71ee232ae4 100644
--- a/django/views/decorators/common.py
+++ b/django/views/decorators/common.py
@@ -6,6 +6,7 @@ def no_append_slash(view_func):
Mark a view function as excluded from CommonMiddleware's APPEND_SLASH
redirection.
"""
+
# view_func.should_append_slash = False would also work, but decorators are
# nicer if they don't have side effects, so return a new function.
@wraps(view_func)
diff --git a/django/views/decorators/csrf.py b/django/views/decorators/csrf.py
index 40ac58bc1d..92771c56df 100644
--- a/django/views/decorators/csrf.py
+++ b/django/views/decorators/csrf.py
@@ -48,6 +48,7 @@ uses the csrf_token template tag, or the CsrfViewMiddleware is used.
def csrf_exempt(view_func):
"""Mark a view function as being exempt from the CSRF view protection."""
+
# view_func.csrf_exempt = True would also work, but decorators are nicer
# if they don't have side effects, so return a new function.
@wraps(view_func)