Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9571 closed (invalid)

Documention of exlude in admin, need tuple not list.

Reported by: rvanlaar Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi, On http://docs.djangoproject.com/en/dev/ref/contrib/admin/#exclude at the exclude example it says:

class AuthorAdmin(admin.ModelAdmin):
    exclude = ('birth_date',)

But it should be

class AuthorAdmin(admin.ModelAdmin):
    exclude = ['birth_date',]

Change History (2)

comment:1 Changed 8 years ago by Brian Rosner

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: invalid
Status: newclosed

This is the wrong change if there is any that needs to be made. r9086 fixed a case where a list works, but a tuple didn't. If you have found an edge case where a tuple is still failing, please report that so it gets fixed. There should be a requirement that exclude should be a list only.

comment:2 Changed 8 years ago by Brian Rosner

*sigh*, my last sentence should have read: "There should not be a requirement that exclude should be a list only."

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