summaryrefslogtreecommitdiff
path: root/docs/releases/4.1.txt
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2023-02-28 20:53:28 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-03-01 13:03:56 +0100
commit14459f80ee3a9e005989db37c26fd13bb6d2fab2 (patch)
treeeb62429ed696ed3a5389f3a676aecfc6d15a99cc /docs/releases/4.1.txt
parent6015bab80e28aef2669f6fac53423aa65f70cb08 (diff)
Fixed #34140 -- Reformatted code blocks in docs with blacken-docs.
Diffstat (limited to 'docs/releases/4.1.txt')
-rw-r--r--docs/releases/4.1.txt13
1 files changed, 5 insertions, 8 deletions
diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt
index 242e4c5b02..d93833b7f7 100644
--- a/docs/releases/4.1.txt
+++ b/docs/releases/4.1.txt
@@ -36,6 +36,7 @@ View subclasses may now define async HTTP method handlers::
from django.http import HttpResponse
from django.views import View
+
class AsyncView(View):
async def get(self, request, *args, **kwargs):
# Perform view logic using await.
@@ -668,12 +669,8 @@ Miscellaneous
migrations.SeparateDatabaseAndState(
database_operations=[],
state_operations=[
- migrations.RemoveConstraint(
- ...
- ),
- migrations.AddConstraint(
- ...
- ),
+ migrations.RemoveConstraint(...),
+ migrations.AddConstraint(...),
],
),
]
@@ -705,8 +702,8 @@ Miscellaneous
``SimpleTestCase.assertFormError()`` and ``assertFormsetError()`` is
deprecated. Use::
- assertFormError(response.context['form_name'], ...)
- assertFormsetError(response.context['formset_name'], ...)
+ assertFormError(response.context["form_name"], ...)
+ assertFormsetError(response.context["formset_name"], ...)
or pass the form/formset object directly instead.