Opened 15 years ago

Last modified 13 years ago

#13529 closed

Documentation Admin Error on Queryset — at Initial Version

Reported by: stephane@… Owned by: nobody
Component: Documentation Version: 1.2-beta
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Change:

class MyModelAdmin(admin.ModelAdmin):

def queryset(self, request):

qs = super(self, MyModelAdmin).queryset(request)
if request.user.is_superuser:

return qs

return qs.filter(author=request.user)

By:

class MyModelAdmin(admin.ModelAdmin):

def queryset(self, request):

qs = super(MyModelAdmin, self).queryset(request)
if request.user.is_superuser:

return qs

return qs.filter(author=request.user)

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top