[1.1.X] Fixed #13529 -- Corrected ModelAdmin example. Thanks to stephane@actinetwork.com for the report.
Backport of r13242 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13243 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6f2a84409e
commit
242c7f3940
|
@ -832,7 +832,7 @@ to show objects owned by the logged-in user::
|
|||
|
||||
class MyModelAdmin(admin.ModelAdmin):
|
||||
def queryset(self, request):
|
||||
qs = super(self, MyModelAdmin).queryset(request)
|
||||
qs = super(MyModelAdmin, self).queryset(request)
|
||||
if request.user.is_superuser:
|
||||
return qs
|
||||
return qs.filter(author=request.user)
|
||||
|
|
Loading…
Reference in New Issue