Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9869 closed (duplicate)

Exclude option in ModelAdmin requires a list, not a tuple

Reported by: doug.waite@… Owned by: nobody
Component: contrib.admin Version: 1.0
Severity: Keywords: options, exclude
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The documentation on this page: (http://docs.djangoproject.com/en/dev/ref/contrib/admin/#exclude) says to give the exclude option a list of form fields to exclude from view. This produces an error. The error comes from (django/contrib/admin/options.py in get_form, line 273). The code on that line is clearly looking for a list, not a tuple. Although the documentation could just be updated to show a list, I think it would be easier to change it to actually use a tuple because all the other form fields (that I know of) use a tuple

Change History (3)

comment:1 in reply to: ↑ description Changed 7 years ago by Doug Waite <doug.waite@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Oops! Made a mistake. The documentation says to give the exclude option a tuple, not a list.

comment:2 Changed 7 years ago by dc

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #9571

comment:3 Changed 7 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

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