diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
a
|
b
|
|
272 | 272 | |
273 | 273 | def has_change_permission(self, request, obj=None): |
274 | 274 | """ |
275 | | Returns True if the given request has permission to change the given |
276 | | Django model instance. |
| 275 | A subclass-provided version of this method can return True if the given |
| 276 | request has permission to change the given Django model instance `obj`. |
277 | 277 | |
278 | | If `obj` is None, this should return True if the given request has |
279 | | permission to change *any* object of the given type. |
| 278 | If `obj` is None, it should return True if the given request has |
| 279 | permission to change *any* object of the model associated with this |
| 280 | ModelAdmin. This default implementation does exactly that and simply |
| 281 | ignores `obj`. |
280 | 282 | """ |
281 | 283 | opts = self.opts |
282 | 284 | return request.user.has_perm(opts.app_label + '.' + opts.get_change_permission()) |
283 | 285 | |
284 | 286 | def has_delete_permission(self, request, obj=None): |
285 | 287 | """ |
286 | | Returns True if the given request has permission to change the given |
287 | | Django model instance. |
| 288 | A subclass-provided version of this method can return True if the given |
| 289 | request has permission to delete the given Django model instance `obj`. |
288 | 290 | |
289 | | If `obj` is None, this should return True if the given request has |
290 | | permission to delete *any* object of the given type. |
| 291 | If `obj` is None, it should return True if the given request has |
| 292 | permission to delete *any* object of the model associated with this |
| 293 | ModelAdmin. This default implementation does exactly that and simply |
| 294 | ignores `obj`. |
291 | 295 | """ |
292 | 296 | opts = self.opts |
293 | 297 | return request.user.has_perm(opts.app_label + '.' + opts.get_delete_permission()) |