@@ -104,8 +104,8 @@ history model in admin.
104
104
105
105
user.user_permissions.clear()
106
106
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 " ),
109
109
)
110
110
111
111
The user below has view permission to the ``Poll `` model and the ``Poll `` history model
@@ -115,7 +115,7 @@ in admin.
115
115
116
116
user.user_permissions.clear()
117
117
user.user_permissions.add(
118
- Permission.objects.get(codename = " view_planet " ),
118
+ Permission.objects.get(codename = " view_poll " ),
119
119
)
120
120
121
121
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.
129
129
# SIMPLE_HISTORY_ENFORCE_HISTORY_MODEL_PERMISSIONS = True in settings
130
130
user.user_permissions.clear()
131
131
user.user_permissions.add(
132
- Permission.objects.get(codename = " view_planet " ),
132
+ Permission.objects.get(codename = " view_poll " ),
133
133
)
134
134
135
135
The user below has view permission to the ``Poll `` model and the ``Poll ``
@@ -140,8 +140,8 @@ history model.
140
140
# SIMPLE_HISTORY_ENFORCE_HISTORY_MODEL_PERMISSIONS = True in settings
141
141
user.user_permissions.clear()
142
142
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 " ),
145
145
)
146
146
147
147
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.
153
153
# SIMPLE_HISTORY_ENFORCE_HISTORY_MODEL_PERMISSIONS = True in settings
154
154
user.user_permissions.clear()
155
155
user.user_permissions.add(
156
- Permission.objects.get(codename = " view_historicalplanet " ),
156
+ Permission.objects.get(codename = " view_historicalpoll " ),
157
157
)
0 commit comments