1
0
mirror of https://github.com/django/django.git synced 2024-12-23 09:36:06 +00:00

Fixed #13529 -- Corrected ModelAdmin example. Thanks to stephane@actinetwork.com for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-05-12 13:24:38 +00:00
parent d0d3e6792d
commit 0e2f215625

View File

@ -880,7 +880,7 @@ to show objects owned by the logged-in user::
class MyModelAdmin(admin.ModelAdmin): class MyModelAdmin(admin.ModelAdmin):
def queryset(self, request): def queryset(self, request):
qs = super(self, MyModelAdmin).queryset(request) qs = super(MyModelAdmin, self).queryset(request)
if request.user.is_superuser: if request.user.is_superuser:
return qs return qs
return qs.filter(author=request.user) return qs.filter(author=request.user)