summaryrefslogtreecommitdiff
path: root/docs/releases/2.2.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/2.2.txt
parent6015bab80e28aef2669f6fac53423aa65f70cb08 (diff)
Fixed #34140 -- Reformatted code blocks in docs with blacken-docs.
Diffstat (limited to 'docs/releases/2.2.txt')
-rw-r--r--docs/releases/2.2.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/releases/2.2.txt b/docs/releases/2.2.txt
index 958e330482..0b2b5e7979 100644
--- a/docs/releases/2.2.txt
+++ b/docs/releases/2.2.txt
@@ -298,11 +298,13 @@ For example, in older versions of Django::
from django.contrib import admin
+
class BaseAdmin(admin.ModelAdmin):
- actions = ['a']
+ actions = ["a"]
+
class SubAdmin(BaseAdmin):
- actions = ['b']
+ actions = ["b"]
``SubAdmin`` would have actions ``'a'`` and ``'b'``.
@@ -310,7 +312,7 @@ Now ``actions`` follows standard Python inheritance. To get the same result as
before::
class SubAdmin(BaseAdmin):
- actions = BaseAdmin.actions + ['b']
+ actions = BaseAdmin.actions + ["b"]
:mod:`django.contrib.gis`
-------------------------
@@ -342,8 +344,8 @@ In usage like::
from django.utils.functional import cached_property
- class A:
+ class A:
@cached_property
def base(self):
return ...
@@ -358,11 +360,11 @@ Use this instead::
import operator
- class A:
+ class A:
...
- alias = property(operator.attrgetter('base'))
+ alias = property(operator.attrgetter("base"))
Permissions for proxy models
----------------------------