Skip to content

Commit e541d04

Browse files
committed
fix admin doc referencing instead of .
1 parent 7ed4ab8 commit e541d04

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/admin.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ history model in admin.
104104
105105
user.user_permissions.clear()
106106
user.user_permissions.add(
107-
Permission.objects.get(codename="view_planet"),
108-
Permission.objects.get(codename="change_planet"),
107+
Permission.objects.get(codename="view_poll"),
108+
Permission.objects.get(codename="change_poll"),
109109
)
110110
111111
The user below has view permission to the ``Poll`` model and the ``Poll`` history model
@@ -115,7 +115,7 @@ in admin.
115115
116116
user.user_permissions.clear()
117117
user.user_permissions.add(
118-
Permission.objects.get(codename="view_planet"),
118+
Permission.objects.get(codename="view_poll"),
119119
)
120120
121121
When ``SIMPLE_HISTORY_ENFORCE_HISTORY_MODEL_PERMISSIONS`` is set to ``True``, permissions to
@@ -129,7 +129,7 @@ though they *have* view permission to the ``Poll`` model.
129129
# SIMPLE_HISTORY_ENFORCE_HISTORY_MODEL_PERMISSIONS = True in settings
130130
user.user_permissions.clear()
131131
user.user_permissions.add(
132-
Permission.objects.get(codename="view_planet"),
132+
Permission.objects.get(codename="view_poll"),
133133
)
134134
135135
The user below has view permission to the ``Poll`` model and the ``Poll``
@@ -140,8 +140,8 @@ history model.
140140
# SIMPLE_HISTORY_ENFORCE_HISTORY_MODEL_PERMISSIONS = True in settings
141141
user.user_permissions.clear()
142142
user.user_permissions.add(
143-
Permission.objects.get(codename="view_planet"),
144-
Permission.objects.get(codename="view_historicalplanet"),
143+
Permission.objects.get(codename="view_poll"),
144+
Permission.objects.get(codename="view_historicalpoll"),
145145
)
146146
147147
The user below has view permission to the ``Poll`` history model but will need to
@@ -153,5 +153,5 @@ the admin application index page nor the ``Poll`` changelist.
153153
# SIMPLE_HISTORY_ENFORCE_HISTORY_MODEL_PERMISSIONS = True in settings
154154
user.user_permissions.clear()
155155
user.user_permissions.add(
156-
Permission.objects.get(codename="view_historicalplanet"),
156+
Permission.objects.get(codename="view_historicalpoll"),
157157
)

0 commit comments

Comments
 (0)