#9869 closed (duplicate)
Exclude option in ModelAdmin requires a list, not a tuple
Reported by: | 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: | no | UI/UX: | no |
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
Oops! Made a mistake. The documentation says to give the exclude option a tuple, not a list.